EddyDesk API V2

Overview

HOST: https://system_domain/api/v2

Authorization

Authorization is performed using Basic Authorization, as parameters it is necessary to pass the user’s e-mail and API key. System administrator API key can be found in Administration->Global settings->System, other user’s keys can be found in the user card, keys are visible only to the main administrator.

The key in the “Authorization: Basic” header is a combination of email:api_key encoded with base64 (i.e. base64(email:api_key))

Authorization header example:

Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=

Permissions

Each user in the system has an API key, the key can be obtained through the methods get user and list of users. API responses are always filtered according to the permissions of the user on whose behalf the API request is being made. Permissions allow for some conditional permissions for full integration through a single user.

Speed limits

The API is rate limited, the default API limit is 300 requests per minute (RPM). If the limit is exceeded, access will be automatically blocked for 20 minutes.

You can use the following response headers to validate the current rate limit for the system and keep track of the number of requests left in the current minute:

X-Rate-Limit: 300
X-Rate-Limit-Remaining: 299

Departments

Departments

List of departments
GET/departments/

CURL Example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/departments/"

URI example

GET https://system_domain/api/v2/departments/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data": [
        {
            "id":1,
            "name":{
                "en":"Support Department"
            }
        },{
            "id":2,
            "name":{
                "en":"Test department"
        }
    ]
}

Work with requests

Tickets

Get tickets
GET/tickets/{?page,search,exact_search,user_list,owner_list,status_list,priority_list,type_list,freeze,deleted,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/&tickets/?page=1"

URI example

GET https://system_domain/api/v2/tickets/?page=2&search=John&exact_search=1&user_list=1,14,22&owner_list=1,44,21&status_list=open,closed&priority_list=1,3&type_list=0,1&freeze=0&deleted=0&from_date_created=2017-12-31 00:00:00&to_date_created=2017-12-31 00:00:00&from_date_updated=2017-12-31 00:00:00&to_date_updated=2017-12-31 00:00:00&order_by=
Options
HideShow
page
number (optional) Example: 2

Page number

search
string (optional) Example: John

Search by requests

exact_search
number (optional) Example: 1

Search for an exact match of search. 1 - full match search, 0 - standard search

user_list
string (optional) Example: 1,14,22

Search for requests by owner ID, separated by commas

owner_list
string (optional) Example: 1,44,21

Search for orders by order executor ID, separated by commas

status_list
string (optional) Example: open,closed

Search for tickets by ticket status ID, separated by commas

priority_list
string (optional) Example: 1,3

Search for tickets by ticket priority ID, separated by commas

type_list
string (optional) Example: 0,1

Search for tickets by ticket type ID, separated by commas

freeze
number (optional) Example: 0

Filter by frozen orders. The value 0 - only active orders, the value 1 - only frozen orders. By default, all applications are listed.

deleted
number (optional) Example: 0

Filter by deleted orders. The value 0 - only active orders, the value 1 - only remote orders. The default value is 0.

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

from_date_updated
string (optional) Example: 2017-12-31 00:00:00

Update date from

to_date_updated
string (optional) Example: 2017-12-31 00:00:00

Modified date before

order_by
string (optional) 

Order sorting, can be specified separated by commas. Applications can be sorted by parameters: date_created, date_updated, viewed_by_staff, viewed_by_client. The sort order is {asc} (ascending) and {desc} (descending). Default value: date_created{desc}

Response  200
HideShow

+Headers

Title
Content-Type: application/json
Body
{
    data: {
        "10": {
            "id":10,
            pid: 0
            "unique_id":"YWP-43009",
            "date_created":"2017-01-13 12:36:58",
            "date_updated":"2017-01-17 13:36:46",
            "title":"New ticket",
            "source": "email",
            "status_id":"open",
            "priority_id":2,
            "type_id":0,
            "department_id":2,
            "department_name":"Support department",
            "owner_id":1,
            "owner_name":"Ivan",
            "owner_lastname":"Petrov",
            "owner_email":"ivan.petrov@example.com",
            "user_id":41,
            "username":"John",
            "user_lastname":"Do",
            "user_email":"john.doe@example.com",
            "cc": [],
            "bcc": [],
            "followers": [],
            "ticket_lock":0,
            "sla_date":"13.01.2017 12:36",
            "freeze_date":"null",
            freeze:0,
            "deleted":0,
            "viewed_by_staff": 1,
            "viewed_by_client": 1,
            "rate": "like",
            "rate_comment": "Nice",
            "rate_date": "2017-01-17 13:33:30",
            "custom_fields":[
                {
                    "id":3,
                    "field_type":"textarea",
                    "field_value":"4345"
                },{
                    "id":4,
                    "field_type":"checkbox",
                    "field_value":1
                }
            ],
            "tags": [
                "one",
                "2",
                "3"
            ],
            "jira_issues": []
        },
        "nine": {
            "id":9,
            pid: 0
            "unique_id":"IQV-84397",
            "date_created":"2016-08-15 17:05:19",
            "date_updated":"2017-01-18 11:44:13",
            "title":"Test ticket",
            "source": "email",
            "status_id":"process",
            "priority_id":3,
            "type_id":1,
            "department_id":2,
            "department_name":"Support department"

Get ticket
GET/tickets/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9"

URI example

GET https://system_domain/api/v2/tickets/9
Options
HideShow
id
number (required) Example: 9

ticket ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 9,
    "pid": 0,
    "unique_id": "IQV-84397",
    "date_created": "2016-08-15 17:05:19",
    "date_updated": "2017-01-18 11:44:13",
    "title": "Test ticket",
    "source": "email",
    "status_id": "process",
    "priority_id": 3,
    "type_id": 1,
    "department_id": 2,
    "department_name": "Support department",
    "owner_id": 1,
    "owner_name": "Ivan",
    "owner_lastname": "Petrov",
    "owner_email": "ivan.petrov@example.com",
    "user_id": 41,
    "user_name": "John",
    "user_lastname": "Doe",
    "user_email": "john.doe@example.com",
    "cc": [],
    "bcc": [],
    "followers": [],
    "ticket_lock": 0,
    "sla_date": "17.01.2017 16:00",
    "freeze_date": "null",
    "freeze": 0,
    "deleted": 0,
    "viewed_by_staff": 1,
    "viewed_by_client": 1,
    "rate": "",
    "rate_comment": "",
    "rate_date": "",
    "custom_fields": [
      {
        "id": 3,
        "field_type": "textarea",
        "field_value": "4345"
      },
      {
        "id": 4,
        "field_type": "checkbox",
        "field_value": 1
      }
    ],
    "tags": [
      "1",
      "2",
      "3"
    ],
    "jira_issues": []
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Create request
POST/tickets/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-title'with%cache" -H "Cache-Control: no-title'with%cache=" 20email&description=Problem%20with%20email%20info%40example.com&custom_fields%5B6%5D=field%20value&custom_fields%5B2%5D=4' "https://system_domain/api/v2/tickets/"

URI example

POST https://system_domain/api/v2/tickets/
Options
HideShow
pid
number (optional) Example: 23

parent ticket ID

title
string (required) Example: Problem with email

Title of the ticket

description
string (required) Example: <p>Problem with email info@example.com</p>

Request text

sla_date
date (optional) Example: 01.01.1970 00:00

SLA date and time

freeze_date
date (optional) Example: 01.01.1970 00:00

Freeze the request to date and time

status_id
string (optional) Example: process

Request status

priority_id
number (optional) Example: 1

priority ID

type_id
number (optional) Example: 2

type ID

department_id
number (optional) Example: 1

department ID

ticket_lock
boolean (optional) Example: false

Ticket lock. true - block the request. false - unblock the order.

owner_id
number (optional) Example: 1

artist ID

user_id
number (optional) Example: 2

ticket owner ID

user_email
string (optional) Example: email@example.com

If the ticket owner ID is not specified, then the user’s e-mail will be used to create the ticket, if the user does not exist, it will be automatically created

cc
mailbox array (optional) 

Letter copy

bcc
mailbox array (optional) 

Bcc message

followers
array user_id (optional) 

List of users following the request, the user must be an employee.

create_from_user
number (optional) Example: 1

The first response in the application on behalf of the employee is 0, on behalf of the user 1, by default 1

custom_fields
array (optional) Example: [1 => 3, 2 => 0]

Array of custom order fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value

files
array of files (optional) 

Array of applications

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 9,
    "pid": 0,
    "unique_id": "IQV-84397",
    "date_created": "2016-08-15 17:05:19",
    "date_updated": "2017-01-18 11:44:13",
    "title": "Test ticket",
    "source": "email",
    "status_id": "process",
    "priority_id": 3,
    "type_id": 1,
    "department_id": 2,
    "department_name": "Support department",
    "owner_id": 1,
    "owner_name": "Ivan",
    "owner_lastname": "Petrov",
    "owner_email": "ivan.petrov@example.com",
    "user_id": 41,
    "user_name": "John",
    "user_lastname": "Doe",
    "user_email": "john.doe@example.com",
    "cc": [],
    "bcc": [],
    "followers": [],
    "ticket_lock": 0,
    "sla_date": "17.01.2017 16:00",
    "freeze_date": "null",
    "freeze": 0,
    "deleted": 0,
    "viewed_by_staff": 1,
    "viewed_by_client": 1,
    "rate": "",
    "rate_comment": "",
    "rate_date": "",
    "custom_fields": [
      {
        "id": 3,
        "field_type": "textarea",
        "field_value": "4345"
      },
      {
        "id": 4,
        "field_type": "checkbox",
        "field_value": 1
      }
    ],
    "tags": [
      "1",
      "2",
      "3"
    ],
    "jira_issues": []
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {owner_id} with id {5} does not exist"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {owner_id} value is incorrect, user must be with staff permissions"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {type_id} value is incorrect or empty"
    }
  ]
}

Update ticket
PUT/tickets/{id}

CURL example

curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"status_id" :"2", "owner_id": "1", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/tickets/9 "

URI example

PUT https://system_domain/api/v2/tickets/9
Options
HideShow
id
number (required) Example: 9

ticket ID

title
string (optional) Example: Problem with email

Title of the ticket

sla_date
date (optional) Example: 01.01.1970 00:00

SLA date and time

freeze_date
date (optional) Example: 01.01.1970 00:00

Freeze the request to date and time

status_id
string (optional) Example: process

Request status

priority_id
number (optional) Example: 1

priority ID

type_id
number (optional) Example: 2

type ID

department_id
number (optional) Example: 1

department ID

cc
mailbox array (optional) 

Letter copy

bcc
mailbox array (optional) 

Bcc message

followers
array user_id (optional) 

List of users following the request, the user must be an employee.

ticket_lock
boolean (optional) Example: false

Ticket lock. true - block the request. false - unblock the order.

owner_id
number (optional) Example: 1

artist ID

user_id
number (optional) Example: 2

ticket owner ID

custom_fields
array (optional) Example: [1 => 3, 2 => 0]

Array of custom order fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 9,
    "pid": 0,
    "unique_id": "IQV-84397",
    "date_created": "2016-08-15 17:05:19",
    "date_updated": "2017-01-18 11:44:13",
    "title": "Test ticket",
    "source": "email",
    "status_id": "process",
    "priority_id": 3,
    "type_id": 1,
    "department_id": 2,
    "department_name": "Support department",
    "owner_id": 1,
    "owner_name": "Ivan",
    "owner_lastname": "Petrov",
    "owner_email": "ivan.petrov@example.com",
    "user_id": 41,
    "user_name": "John",
    "user_lastname": "Doe",
    "user_email": "john.doe@example.com",
    "cc": [],
    "bcc": [],
    "followers": [],
    "ticket_lock": 0,
    "sla_date": "17.01.2017 16:00",
    "freeze_date": "null",
    "freeze": 0,
    "deleted": 0,
    "viewed_by_staff": 1,
    "viewed_by_client": 1,
    "rate": "",
    "rate_comment": "",
    "rate_date": "",
    "custom_fields": [
      {
        "id": 3,
        "field_type": "textarea",
        "field_value": "4345"
      },
      {
        "id": 4,
        "field_type": "checkbox",
        "field_value": 1
      }
    ],
    "tags": [
      "1",
      "2",
      "3"
    ],
    "jira_issues": []
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {sla_date} value is incorrect or empty (date format 01.01.1970 00:00)"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {owner_id} with id {5} does not exist"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {owner_id} value is incorrect, user must be with staff permissions"
    },
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Field {type_id} value is incorrect or empty"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Delete order
DELETE/tickets/{id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache_do" v2/tickets/9"

URI example

DELETE https://system_domain/api/v2/tickets/9
Options
HideShow
id
number (required) Example: 9

ticket ID

delete
boolean (optional) Example: true

false - move the order to the deleted ones. true - complete removal of the order. Default value is false

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Ticket with id {9} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Ticket replies

Get replies
GET/tickets/{ticket_id}/posts/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/page=1"

URI example

GET https://system_domain/api/v2/tickets/9/posts/
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID,

page
number (optional) Example: 1

Page number

Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data":[
        {
            "ticket_id":9,
            "id":139,
            "user_id":1,
            "text":"<p>post content</p>",
            "date_created":"17:45:00 26.01.2017",
            "date_updated":"17:45:00 26.01.2017",
            "files":[]
        },{
            "ticket_id":9,
            "id":138,
            "user_id":1,
            "text":"<p>1</p><p>2</p><p>3</p>",
            "date_created":"14:59:00 17.01.2017",
            "date_updated":"14:59:00 17.01.2017",
            "files":[
                {
                    "name":"test.gif",
                    "url":"https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
                    "data_type":"gif"
                },{
                    "name":"test.png",
                    "url":"https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
                    "data_type":"png"
                }
            ]
        },
    ],
    "pagination":{
                "total":85,
                "per_page":30,
                "current_page":1,
                "total_pages":3
    }
}

Add reply
POST/tickets/{ticket_id}/posts/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/posts/"

URI example

POST https://system_domain/api/v2/tickets/9/posts/
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

text
string (required) Example: Problem with email

Comment text

user_id
number (optional) Example: 1

The owner of the comment, if not specified, the owner will be the API user.

files
array of files (optional) 

Array of applications

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "ticket_id": 9,
    "id": 150,
    "user_id": 1,
    "text": "<p>Problem with email</p>",
    "date_created": "17:02:00 17.01.2017",
    "date_updated": "17:02:00 17.01.2017",
    "files": [
      {
        "name": "test.gif",
        "url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
        "data_type": "gif"
      },
      {
        "name": "test.png",
        "url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
        "data_type": "png"
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Required {text} request",
      "details": "Required field is missing or empty"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Update reply
PUT/tickets/{ticket_id}/posts/{id}

CURL example

curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/posts/150"

URI example

PUT https://system_domain/api/v2/tickets/9/posts/15
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

id
number (required) Example: 15

post ID

text
string (required) Example: Problem with email

Comment text

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "ticket_id": 9,
    "id": 150,
    "user_id": 1,
    "text": "<p>Problem with email</p>",
    "date_created": "17:02:00 17.01.2017",
    "date_updated": "17:02:00 17.01.2017",
    "files": [
      {
        "name": "test.gif",
        "url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
        "data_type": "gif"
      },
      {
        "name": "test.png",
        "url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
        "data_type": "png"
      }
    ]
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Delete reply
DELETE/tickets/{ticket_id}/posts/{id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/posts/15"

URI example

DELETE https://system_domain/api/v2/tickets/9/posts/15
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

id
number (required) Example: 15

post ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Post with id {15} in ticket with id {9} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Post with id {15} in ticket with id {9} does not exist"
    }
  ]
}

Internal notes

Get internal notes
GET/tickets/{ticket_id}/comments/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/comments/?page=1"

URI example

GET https://system_domain/api/v2/tickets/9/comments/
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

page
number (optional) Example: 1

Page number

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "ticket_id": 9,
      "id": 6,
      "user_id": 1,
      "text": "test",
      "date_created": "18:18:34 05.01.2017",
      "visible": "staff",
      "files": [
        {
          "name": "test.gif",
          "url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
          "data_type": "gif"
        },
        {
          "name": "test.png",
          "url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
          "data_type": "png"
        }
      ]
    }
  ],
  "pagination": {
    "total": 1,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Add internal note
POST/tickets/{ticket_id}/comments/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/comments/"

URI example

POST https://system_domain/api/v2/tickets/9/comments/
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

text
string (required) Example: Problem with email

Internal note text

user_id
number (optional) Example: 1

The owner of the internal note. If not specified, the owner will be the API user.

files
array of files (optional) 

Array of applications

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "ticket_id": 9,
    "id": 6,
    "user_id": 1,
    "text": "test",
    "date_created": "18:18:34 05.01.2017",
    "visible": "staff",
    "files": [
      {
        "name": "test.gif",
        "url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
        "data_type": "gif"
      },
      {
        "name": "test.png",
        "url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
        "data_type": "png"
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Required {text} request",
      "details": "Required field is missing or empty"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Update internal note
PUT/tickets/{ticket_id}/comments/{id}

CURL example

curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=Problem with email' "https://system_domain/api/v2/tickets/9/comments/6"

URI example

PUT https://system_domain/api/v2/tickets/9/comments/6
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

id
number (required) Example: 6

Internal note ID

text
string (required) Example: Problem with email

Internal note text

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "ticket_id": 9,
    "id": 6,
    "user_id": 1,
    "text": "Problem with email",
    "date_created": "18:18:34 05.01.2017",
    "visible": "staff",
    "files": [
      {
        "name": "test.gif",
        "url": "https://system_domain/en/file/download/f8bb43e593d867d27c965d38dfec721fbb084cf9",
        "data_type": "gif"
      },
      {
        "name": "test.png",
        "url": "https://system_domain/en/file/download/b818daf594dd3b61098cce7fef7954bc0314edd5",
        "data_type": "png"
      }
    ]
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Ticket with id {9} does not exist"
    }
  ]
}

Delete internal note
DELETE/tickets/{ticket_id}/comments/{id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/9/comments/15"

URI example

DELETE https://system_domain/api/v2/tickets/9/comments/15
Options
HideShow
ticket_id
number (required) Example: 9

ticket ID

id
number (required) Example: 15

internal note ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Comment with id {15} in ticket with id {9} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Comment with id {15} in ticket with id {9} does not exist"
    }
  ]
}

Audit

Audit request
GET/tickets/{id}/audit/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/11/audit/?page=1"

URI example

GET https://system_domain/api/v2/tickets/11/audit/
Options
HideShow
id
number (required) Example: 11

ticket ID

page
number (optional) Example: 1

Page number

event_list
string (optional) Example: ``

Search for audit by event, separated by commas

user_list
string (optional) Example: 1,14,22

Search for an audit by user ID, separated by commas

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "0": {
      "id": 2012,
      "event": "ticket_view",
      "text": {
        "ru": "Просмотр заявки",
        "en": "View request",
        "ua": "Перегляд заявки"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:11:27 30.01.2017"
    },
    "1": {
      "id": 2009,
      "event": "ticket_answer",
      "text": {
        "ru": "Добавление ответа на заявку",
        "en": "Add a response to the request",
        "ua": "Додавання відповіді на заявку"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:11:23 30.01.2017"
    },
    "2": {
      "id": 2010,
      "event": "ticket_answer",
      "text": {
        "ru": "Отправление письма на э-почту \"info@EddyDesk.com\"</strong>",
        "en": "Send a message to email \"info@EddyDesk.com\"</strong>",
        "ua": "Відправлення листа на е-пошту \"info@EddyDesk.com\"</strong>"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:11:23 30.01.2017"
    },
    "3": {
      "id": 2011,
      "event": "ticket_view",
      "text": {
        "ru": "Просмотр заявки",
        "en": "View request",
        "ua": "Перегляд заявки"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:11:23 30.01.2017"
    },
    "4": {
      "id": 2008,
      "event": "ticket_view",
      "text": {
        "ru": "Просмотр заявки",
        "en": "View request",
        "ua": "Перегляд заявки"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:11:17 30.01.2017"
    },
    "5": {
      "id": 2006,
      "event": "ticket_view",
      "text": {
        "ru": "Просмотр заявки",
        "en": "View request",
        "ua": "Перегляд заявки"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:10:57 30.01.2017"
    },
    "6": {
      "id": 2005,
      "event": "status_update",
      "text": {
        "ru": "Изменение статуса заявки с \"Открыто\"</strong> на \"В процессе\"</strong>",
        "en": "Changing request status from \"Открыто\"</strong> to \"В процессе\"</strong>",
        "ua": "Зміна статусу заявки з \"Открыто\"</strong> на \"В процессе\"</strong>"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:10:56 30.01.2017"
    },
    "7": {
      "id": 2004,
      "event": "owner_update",
      "text": {
        "ru": "Изменение исполнителя заявки с \"Неприсвоенный\"</strong> на \"John \"</strong>",
        "en": "Changing responsible party from \"Unassigned\"</strong> to \"John \"</strong>",
        "ua": "Зміна виконавця заявки з \"Неприсвоений\"</strong> на \"John \"</strong>"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:10:51 30.01.2017"
    },
    "8": {
      "id": 2003,
      "event": "ticket_view",
      "text": {
        "ru": "Просмотр заявки",
        "en": "View request",
        "ua": "Перегляд заявки"
      },
      "user_id": 1,
      "user_name": "John",
      "date_created": "11:10:46 30.01.2017"
    }
  },
  "pagination": {
    "total": "9",
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Billing

Request billing
GET/tickets/{id}/billing/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/tickets/11/billing/?page=1"

URI example

GET https://system_domain/api/v2/tickets/11/billing/
Options
HideShow
id
number (required) Example: 11

ticket ID

page
number (optional) Example: 1

Page number

staff_list
string (optional) Example: 1,14,22

Search by employee, separated by commas

creator_list
string (optional) Example: 1,14,22

Search by ticket creator, separated by commas

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

from_billing_date
string (optional) Example: 2017-12-31 00:00:00

Billing date from

to_billing_date
string (optional) Example: 2017-12-31 00:00:00

Billing date to

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 5949,
      "action": "create-post",
      "comment": "Adding reply",
      "spent_seconds": 26,
      "paid_seconds": 26,
      "staff_id": 1,
      "staff_name": "Administrator",
      "billing_date": "16:25:42 12.02.2021",
      "creator_id": -1,
      "creator_name": "System",
      "date_created": "16:25:42 12.02.2021"
    },
    {
      "id": 5948,
      "action": null,
      "comment": "234234",
      "spent_seconds": 180,
      "paid_seconds": 180,
      "staff_id": 1,
      "staff_name": "Administrator",
      "billing_date": "23:37:00 08.02.2021",
      "creator_id": 1,
      "creator_name": "Administrator",
      "date_created": "23:37:54 08.02.2021"
    },
    {
      "id": 5947,
      "action": null,
      "comment": "Hello",
      "spent_seconds": 118800,
      "paid_seconds": 1198800,
      "staff_id": -1,
      "staff_name": "System",
      "billing_date": "23:12:00 08.02.2021",
      "creator_id": 1,
      "creator_name": "Administrator",
      "date_created": "23:28:44 08.02.2021"
    },
    {
      "id": 5946,
      "action": null,
      "comment": "test",
      "spent_seconds": 7200,
      "paid_seconds": 10800,
      "staff_id": 1,
      "staff_name": "Administrator",
      "billing_date": "23:12:00 08.02.2021",
      "creator_id": -1,
      "creator_name": "System",
      "date_created": "23:27:38 08.02.2021"
    },
    {
      "id": 5945,
      "action": null,
      "comment": "test",
      "spent_seconds": 63,
      "paid_seconds": 122,
      "staff_id": 15,
      "staff_name": "TEST TEST",
      "billing_date": "23:12:00 08.02.2021",
      "creator_id": 1,
      "creator_name": "Administrator",
      "date_created": "23:21:26 08.02.2021"
    }
  ],
  "pagination": {
    "total": 5,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Ticket fields

Get ticket fields
GET/custom_fields/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/"

URI example

GET https://system_domain/api/v2/custom_fields/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
"data": {
"2": {
    "id": 2,
    "name": {
        "en": "Select"
    },
    "field_type": "select",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        }
    }
},
"3": {
    "id": 3,
    "name": {
        "en": "Date"
    },
    "field_type": "date",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": false
        }
    }
},
"4": {
    "id": 4,
    "name": {
        "fr": "Checkbox",
    },
    "field_type": "checkbox",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": false
        }
    }
},
"5": {
    "id": 5,
    "name": {
        "en": "Text"
    },
    "field_type": "text",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": true,
            "required_to_close_ticket": true
        }
    }
},
"6": {
    "id": 6,
    "name": {
        "en": "Textarea",
    },
    "field_type": "textarea",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": false
        }
    }
},
"7": {
    "id": 7,
    "name": {
        "en": "Number"
    },
    "field_type": "number",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": false
        }
    }
},
"8": {
    "id": 8,
    "name": {
        "1": {
            "en": "Related"
        },
        "2": {
            "en": "Related 2"
        },
        "3": {
            "en": "Related 3",
        },
        "4": {
            "en": "Related 4"
        }
    },
    "field_type": "hierarchy",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": false,
            "required_to_close_ticket": true
        },
        "user": {
            "view": true,
            "edit": true,
            "required_to_create_ticket": true,
            "required_to_close_ticket": false
        }
    }
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}

Get ticket fields
GET/custom_fields/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2"

URI example

GET https://system_domain/api/v2/custom_fields/2
Options
HideShow
id
number (required) Example: 2

field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "2": {
      "id": 2,
      "name": {
        "ru": "Select",
        "en": "Select",
        "ua": "Select"
      },
      "field_type": "select",
      "permissions": {
        "staff": {
          "view": true,
          "edit": true,
          "required_to_create_ticket": false,
          "required_to_close_ticket": true
        },
        "user": {
          "view": true,
          "edit": true,
          "required_to_create_ticket": false,
          "required_to_close_ticket": true
        }
      }
    }
  }
}

Ticket field options

Attention

Methods are available only for fields with type (field_type): dropdown list (select) and associated fields (hierarchy)!

Get options
GET/custom_fields/{custom_field_id}/options/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2/options"

URI example

GET https://system_domain/api/v2/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 5,
      "pid": 0,
      "name": {
        "en": "1"
      }
    },
    {
      "id": 6,
      "pid": 0,
      "name": {
        "en": "2"
      }
    },
    {
      "id": 7,
      "pid": 0,
      "name": {
        "en": "3"
      }
    },
    {
      "id": 171,
      "pid": 0,
      "name": {
        "en": "4"
      }
    }
  ],
  "pagination": {
    "total": 4,
    "per_page": 50,
    "current_page": 1,
    "total_pages": 1
  }
}

Add/update options
POST/custom_fields/{custom_field_id}/options/

CURL example

Add/update options

The general limit for adding/updating options is 100 entries per request. The required option parameter is name.

  • To add a new option, you must specify name - {"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}

  • To add a new option for associated fields at any level - use pid (id of the parent option) - {"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}

  • To update an existing option, use the id parameter, only the name parameter is available for changes - {"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}

Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2/custom_fields/2/options"

URI example

POST https://system_domain/api/v2/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

field ID

options
array (required) Example: {"options":[{"id": "20", "name":{"en":"update option","en":"update option","ua":"update option" }}]}

Add/update options

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 20,
      "pid": 0,
      "name": {
        "en": "update option"
      }
    },
    {
      "id": 233,
      "pid": 0,
      "name": {
        "en": "new option"
      }
    },
    {
      "id": 234,
      "pid": 21,
      "name": {
        "en": "new option"
      }
    }
  ]
}

Delete option
DELETE/custom_fields/{custom_field_id}/options/{option_id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/custom_fields/2/options/233"

URI example

DELETE https://system_domain/api/v2/custom_fields/233/options/233
Options
HideShow
custom_field_id
number (required) Example: 233

field ID

option_id
number (required) Example: 233

option ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Option with id {233} successfully deleted"
    }
  ]
}

Statuses

Status list
GET/statuses/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/statuses/"

URI example

GET https://system_domain/api/v2/statuses/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data":[
        {
            "id":"open",
            "name":{
                "en":"Open",
            }
        },{
            "id":"process",
            "name":{
                "en":"In progress",
            }
        },{
            "id":"closed",
            "name":{
                "en":"Closed",
            }
        }
    ]
}

Priorities

Priority List
GET/priorities/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/priorities/"

URI example

GET https://system_domain/api/v2/priorities/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data":[
        {
            "id":2,
            "name":{
                "en":"Standard",
            }
        },{
            "id":3,
            "name":{
                "en":"Medium",
            }
        },{
            "id":1,
            "name":{
                "en":"Very urgent",
            }
        }
    ]
}

Types

List of types
GET/types/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/types/"

URI example

GET https://system_domain/api/v2/types/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data":[
        {
            "id":0,
            "name":{
                "en":"Without type",
            }
        },{
            "id":1,
            "name":{
                "en":"Problem",
            }
        },{
            "id":2,
            "name":{
                "en":"Task",
            }
        },{
            "id":3,
            "name":{
                "en":"Bug",
            }
        }
    ]
}

Work with contacts

Users

List of users
GET/users/{?page,search,exact_search,group_list,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/?page=1"

URI example

GET https://system_domain/api/v2/users/?page=1&search=John Doe&exact_search=1&group_list=1,2&from_date_created=2018-12-31 00:00:00&to_date_created=2018-12-31 00:00:00&from_date_updated=2018-12-31 00:00:00&to_date_updated=2018-12-31 00:00:00&order_by=name
Options
HideShow
page
number (optional) Example: 1

Page number

search
string (optional) Example: John Doe

Search by user

exact_search
number (optional) Example: 1

Search for an exact match of search. 1 - full match search, 0 - standard search

group_list
number (optional) Example: 1,2

Search for users by group ID, separated by commas

id_list
number (optional) Example: 1,2,3

Search for users by ID, separated by commas

from_date_created
string (optional) Example: 2018-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2018-12-31 00:00:00

Creation date before

from_date_updated
string (optional) Example: 2018-12-31 00:00:00

Update date from

to_date_updated
string (optional) Example: 2018-12-31 00:00:00

Update date before

order_by
string (optional) Example: name

User sorting, can be specified separated by commas. Users can be sorted by parameters: date_created, date_updated, name. The sort order is {asc} (ascending) and {desc} (descending). Default value: name{asc}

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 1,
      "date_created": "2019-01-01 00:00:00",
      "date_updated": "2019-01-01 00:00:00",
      "name": "Admin",
      "lastname": "",
      "email": "test@eddydesk.com",
      "phone": "+37129770143",
      "skype": "",
      "website": "",
      "organization": "",
      "status": "active",
      "language": "en",
      "notifications": 0,
      "api_key": "a32858b4-a65e-49ef-a960-0b7e8d5d1e47",
      "group": {
        "id": 2,
        "type": "staff",
        "name": {
          "ru": "Администратор",
          "en": "Administrator",
          "ua": ""
        },
        "disable": 0
      },
      "department": [
        1,
        2
      ],
      "ldap_username": "",
      "user_status": "online",
      "custom_fields": [
        {
          "id": 87,
          "field_type": "textarea",
          "field_value": "test"
        },
        {
          "id": 88,
          "field_type": "checkbox",
          "field_value": 1
        }
      ]
    },
    {
      "id": 6,
      "date_created": "2019-01-01 00:00:00",
      "date_updated": "2019-01-01 00:00:00",
      "name": "Test",
      "lastname": "",
      "email": "test@test.lv",
      "phone": "",
      "skype": "",
      "website": "",
      "organization": "",
      "status": "active",
      "language": "en",
      "notifications": 0,
      "api_key": "a43e6bdc-2ff9-483b-8ebf-ea3ade763864",
      "group": {
        "id": 1,
        "type": "user",
        "name": {
          "ru": "Клиент",
          "en": "Client",
          "ua": "Клиент"
        },
        "disable": 0
      },
      "department": [
        1,
        2
      ],
      "ldap_username": "",
      "user_status": "online",
      "custom_fields": [
        {
          "id": 87,
          "field_type": "textarea",
          "field_value": "test"
        },
        {
          "id": 88,
          "field_type": "checkbox",
          "field_value": 1
        }
      ]
    }
  ],
  "pagination": {
    "total": 2,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Get user
GET/users/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/1"

URI example

GET https://system_domain/api/v2/users/1
Options
HideShow
id
number (required) Example: 1

user ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 1,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "Admin",
    "lastname": "",
    "email": "test@eddydesk.com",
    "phone": "+37129770143",
    "skype": "",
    "website": "",
    "organization": "",
    "status": "active",
    "language": "en",
    "notifications": 0,
    "api_key": "a32858b4-a65e-49ef-a960-0b7e8d5d1e47",
    "group": {
      "id": 2,
      "type": "staff",
      "name": {
        "ru": "Администратор",
        "en": "Administrator",
        "ua": "Администратор"
      },
      "disable": 0
    },
    "department": [
      1,
      2
    ],
    "ldap_username": "",
    "user_status": "online",
    "custom_fields": [
      {
        "id": 87,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 88,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}

Add user
POST/users/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'name=John&email=info@example.com3&group_id=1&department[0]=1&department[1]=2&password=12345678&custom_fields[2]=4&custom_fields[4]=test' "https://system_domain/api/v2/users/"

URI example

POST https://system_domain/api/v2/users/
Options
HideShow
name
string (required) Example: John

Name

lastname
string (optional) Example: Doe

Last name

email
string (required) Example: info@example.com

Email

phone
string (optional) Example: 37192345678

Phone

skype
string (optional) Example: ``

Skype

website
string (optional) Example: http://example.com

Website

organization
string (optional) Example: Organization

Organization. The name of new organization. If filled, the organiz_id field is not taken into account.

organiz_id
number (optional) Example: ``

ID of an existing organization

status
string (optional) Example: test user

User status. Available statuses: active, inactive, disabled, fired.

language
string (optional) Example: en

User language. All active languages in the system are available.

notifications
number (optional) Example: 1

Email notifications. 0 - disabled. Available values are 1 and 0

group_id
number (required) Example: 1

group ID

department
array (required) Example: [0 => 1, 1 => 2]

User departments

password
string (required) Example: 123456

Password

user_status
string (optional) Example: online

User activity status

custom_fields
array (optional) Example: [87 => 'test', 2 => 1]

Array of custom contact fields, example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 22,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "John",
    "lastname": "Doe",
    "email": "info@example.com",
    "phone": "37192345678",
    "skype": "",
    "website": "http://example.com",
    "organization": {
      "id": 8,
      "name": "Organization",
      "domains": "",
      "address": "",
      "phone": "37192345678",
      "email": "info@example.com",
      "web": "http://example.com"
    },
    "status": "active",
    "language": "en",
    "notifications": 0,
    "api_key": "cf780f93-8bd4-460d-8a56-1f6adadb8e46",
    "group": {
      "id": 1,
      "type": "user",
      "name": {
        "ru": "Клиент",
        "en": "Client",
        "ua": "Клиент"
      },
      "disable": 0
    },
    "department": [
      1,
      2
    ],
    "ldap_username": "",
    "user_status": "online",
    "custom_fields": [
      {
        "id": 87,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 88,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Required {name} field",
      "details": "Required field {name} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {email} field",
      "details": "Required field {email} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {group_id} field",
      "details": "Required field {group_id} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {department} field",
      "details": "Required field {department} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {password} field",
      "details": "Required field {password} is missing or empty"
    }
  ]
}

Update user
PUT/users/{id}

CURL example

curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"lastname":"Doe", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/users/22"

URI example

PUT https://system_domain/api/v2/users/22
Options
HideShow
id
number (required) Example: 22

user ID

name
string (optional) Example: John

Name

lastname
string (optional) Example: Doe

Last name

email
string (optional) Example: info@example.com

Email

phone
string (optional) Example: 37192345678

Phone

skype
string (optional) Example: ``

Skype

website
string (optional) Example: http://example.com

Website

organization
string (optional) Example: Organization

Organization. The name of new organization. If filled, the organiz_id field is not taken into account.

organiz_id
number (optional) Example: ``

ID of an existing organization

status
string (optional) Example: test user

User status. Available statuses: active, inactive, disabled, fired.

language
string (optional) Example: en

User language. All active languages in the system are available.

notifications
number (optional) Example: 1

Email notifications. 0 - disabled. Available values are 1 and 0

group_id
number (optional) Example: 1

group ID

department
array (optional) Example: [0 => 1, 1 => 2]

User departments

password
string (optional) Example: 123456

Password

user_status
string (optional) Example: online

User activity status

custom_fields
array (optional) Example: [87 => 'test', 2 => 1]

Array of custom contact fields example: custom_fields[field_id] = value, in case of a hierarchical field, the level must be specified custom_fields[field_id][level] = value

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 22,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "John",
    "lastname": "Doe",
    "email": "info@example.com",
    "phone": "37192345678",
    "skype": "",
    "website": "http://example.com",
    "organization": {
      "id": 8,
      "name": "Organization",
      "domains": "",
      "address": "",
      "phone": "37192345678",
      "email": "info@example.com",
      "web": "http://example.com"
    },
    "status": "active",
    "language": "en",
    "notifications": 0,
    "api_key": "cf780f93-8bd4-460d-8a56-1f6adadb8e46",
    "group": {
      "id": 1,
      "type": "user",
      "name": {
        "ru": "Клиент",
        "en": "Client",
        "ua": "Клиент"
      },
      "disable": 0
    },
    "department": [
      1,
      2
    ],
    "ldap_username": "",
    "user_status": "online",
    "custom_fields": [
      {
        "id": 87,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 88,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Required {name} field",
      "details": "Required field {name} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {email} field",
      "details": "Required field {email} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {group_id} field",
      "details": "Required field {group_id} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {department} field",
      "details": "Required field {department} is missing or empty"
    },
    {
      "code": "e-411",
      "title": "Required {password} field",
      "details": "Required field {password} is missing or empty"
    }
  ]
}

Delete user
DELETE/users/{id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22"

URI example

DELETE https://system_domain/api/v2/users/22
Options
HideShow
id
number (required) Example: 22

user ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "User with id {22} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "User with id {22} does not exist"
    }
  ]
}

User fields

Get user fields
GET/users/custom_fields/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/"

URI example

GET https://system_domain/api/v2/users/custom_fields/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
"data": {
"2": {
    "id": 2,
    "name": {
        "en": "Select"
    },
    "field_type": "select",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"3": {
    "id": 3,
    "name": {
        "en": "Date"
    },
    "field_type": "date",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"4": {
    "id": 4,
    "name": {
        "ru": "Checkbox"
    },
    "field_type": "checkbox",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"5": {
    "id": 5,
    "name": {
        "en": "Text",
    },
    "field_type": "text",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": true
        }
    }
},
"6": {
    "id": 6,
    "name": {
        "en": "Textarea",
    },
    "field_type": "textarea",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"7": {
    "id": 7,
    "name": {
        "en": "Number",
    },
    "field_type": "number",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"8": {
    "id": 8,
    "name": {
        "1": {
            "en": "Related"
        },
        "2": {
            "en": "Related 2"
        },
        "3": {
            "en": "Related 3"
        },
        "4": {
            "en": "Related 4"
        }
    },
    "field_type": "hierarchy",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": true
        }
    }
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}

Get user field
GET/users/custom_fields/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2"

URI example

GET https://system_domain/api/v2/users/custom_fields/2
Options
HideShow
id
number (required) Example: 2

field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "2": {
      "id": 2,
      "name": {
        "en": "Select"
      },
      "field_type": "select",
      "permissions": {
        "staff": {
          "view": true,
          "edit": true,
          "required": false
        },
        "user": {
          "view": true,
          "edit": true,
          "required": false
        }
      }
    }
  }
}

User field options

Attention

Methods are only available for fields with type (field_type): dropdown list (select) and associated fields (hierarchy)!

Get options
GET/users/custom_fields/{custom_field_id}/options/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2/options"

URI example

GET https://system_domain/api/v2/users/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
    "data": [
        {
            "id": 5,
            "pid": 0,
            "name": {
                "en": "1",
            }
        },
        {
            "id": 6,
            "pid": 0,
            "name": {
                "en": "2",
            }
        },
        {
            "id": 7,
            "pid": 0,
            "name": {
                "en": "3",
            }
        },
        {
            "id": 171,
            "pid": 0,
            "name": {
                "en": "4",
            }
        }
    ],
    "pagination": {
        "total": 4,
        "per_page": 50,
        "current_page": 1,
        "total_pages": 1
    }
}

Add/update options
POST/users/custom_fields/{custom_field_id}/options/

CURL example

Add/update options

The general limit for adding/updating options is 100 entries per request. The required option parameter is name.

  • To add a new option, you must specify name - {"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}

  • To add a new option for associated fields at any level - use pid (id of the parent option) - {"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}

  • To update an existing option, use the id parameter, only the name parameter is available for changes - {"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}

Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2users/users/custom_fields/2/options"

URI example

POST https://system_domain/api/v2/users/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

field ID

options
array (required) Example: {"options":[{"id": "20", "name":{"ru":"update option","en":"update option","ua":"update option"}}]}

Add/Update Options

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 20,
      "pid": 0,
      "name": {
        "en": "update option"
      }
    },
    {
      "id": 233,
      "pid": 0,
      "name": {
        "en": "new option"
      }
    },
    {
      "id": 234,
      "pid": 21,
      "name": {
        "en": "new option"
      }
    }
  ]
}

Delete option
DELETE/users/custom_fields/{custom_field_id}/options/{option_id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/custom_fields/2/options/233"

URI example

DELETE https://system_domain/api/v2/users/custom_fields/233/options/233
Options
HideShow
custom_field_id
number (required) Example: 233

field ID

option_id
number (required) Example: 233

option ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Option with id {233} successfully deleted"
    }
  ]
}

User notes

Get note
GET/users/{user_id}/notes/{?page}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/notes"

URI example

GET https://system_domain/api/v2/users/22/notes/?page=1
Options
HideShow
user_id
number (required) Example: 22

user ID

page
number (optional) Example: 1

Page number

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 79,
      "creator_id": 1,
      "user_id": 22,
      "text": "",
      "date_created": "19:41:09 19.03.2019",
      "date_updated": "19:41:09 19.03.2019",
      "file": {
        "name": "test_image_png.png",
        "url": "https://system_domain/en/file/download/d73a880871041e53a70bac2f05c439b6fd5ed0c7",
        "data_type": "png"
      }
    },
    {
      "id": 78,
      "creator_id": 1,
      "user_id": 22,
      "text": "test",
      "date_created": "19:40:52 19.03.2019",
      "date_updated": "19:40:53 19.03.2019",
      "file": []
    }
  ],
  "pagination": {
    "total": 2,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "User with id {22} does not exist"
    }
  ]
}

Add note
POST/users/{user_id}/notes/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=test' "https://system_domain/api/v2/users/22/notes"

URI example

POST https://system_domain/api/v2/users/22/notes/
Options
HideShow
user_id
number (required) Example: 22

User ID

text
string (optional) Example: test

Text of note

file
file (optional) Example: ``

File of note

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 81,
    "creator_id": 1,
    "user_id": 22,
    "text": "test",
    "date_created": "19:46:56 19.03.2019",
    "date_updated": "19:46:56 19.03.2019",
    "file": []
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "User with id {22} does not exist"
    }
  ]
}

Delete note
DELETE/users/{user_id}/notes/{note_id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/notes/80"

URI example

DELETE https://system_domain/api/v2/users/22/notes/80
Options
HideShow
user_id
number (required) Example: 22

User ID

note_id
number (required) Example: 80

Note ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Note with id {80} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Note with id {80} in user with id {22} does not exist"
    }
  ]
}

User statuses

User status history
GET/users/{user_id}/statuses_log/{?page,from_date_created,to_date_created,statuses}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/users/22/statuses_log"

URI example

GET https://system_domain/api/v2/users/22/statuses_log/?page=1&from_date_created=2017-12-31 00:00:00&to_date_created=2017-12-31 00:00:00&statuses=online,offline
Options
HideShow
user_id
number (required) Example: 22

User ID

page
number (optional) Example: 1

Page number

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

statuses
string (optional) Example: online,offline

List of statuses, separated by commas

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 2,
      "status_id": "on-hold",
      "name": {
        "en": "On hold"
      },
      "date_created": "2020-11-30 23:28:36"
    },
    {
      "id": 1,
      "status_id": "online",
      "name": {
        "en": "Online"
      },
      "date_created": "2020-10-08 23:11:45"
    }
  ],
  "pagination": {
    "total": 26,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "User with id {22} does not exist"
    }
  ]
}

Organizations

List of organizations
GET/organizations/{?page,search,exact_search,from_date_created,to_date_created,from_date_updated,to_date_updated}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/?page=1"

URI example

GET https://system_domain/api/v2/organizations/?page=1&search=hde&exact_search=1&from_date_created=2018-12-31 00:00:00&to_date_created=2018-12-31 00:00:00&from_date_updated=2018-12-31 00:00:00&to_date_updated=2018-12-31 00:00:00
Options
HideShow
page
number (optional) Example: 1

Page number

search
string (optional) Example: hde

Search by organization

exact_search
number (optional) Example: 1

Search for an exact match of search. 1 - full match search, 0 - standard search

from_date_created
string (optional) Example: 2018-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2018-12-31 00:00:00

Creation date before

from_date_updated
string (optional) Example: 2018-12-31 00:00:00

Update date from

to_date_updated
string (optional) Example: 2018-12-31 00:00:00

Modified date before

order_by
string (optional) Example: name

Organization sorting, can be specified separated by commas. Organizations can be sorted by the following parameters: date_created, date_updated, name. The sort order is {asc} (ascending) and {desc} (descending). Default value: name{asc}

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 2,
      "date_created": "2019-01-01 00:00:00",
      "date_updated": "2019-01-01 00:00:00",
      "name": "EddyDesk",
      "domains": "@eddydesk.com",
      "address": "",
      "phone": "",
      "email": "",
      "web": "https://eddydesk.com",
      "minute_limit": 0,
      "employees": [
        1506760,
        1506763,
        1506743
      ],
      "managers": [],
      "custom_fields": [
        {
          "id": 89,
          "field_type": "textarea",
          "field_value": "test"
        },
        {
          "id": 90,
          "field_type": "checkbox",
          "field_value": 1
        }
      ]
    },
    {
      "id": 11,
      "date_created": "2019-01-01 00:00:00",
      "date_updated": "2019-01-01 00:00:00",
      "name": "Test",
      "domains": "@hde.com",
      "address": "",
      "phone": "",
      "email": "1555@ED.com",
      "web": "",
      "minute_limit": 10000,
      "employees": [
        1506780,
        1506782,
        1506783
      ],
      "managers": [
        1506783
      ],
      "custom_fields": [
        {
          "id": 89,
          "field_type": "textarea",
          "field_value": "test"
        },
        {
          "id": 90,
          "field_type": "checkbox",
          "field_value": 1
        }
      ]
    }
  ],
  "pagination": {
    "total": "2",
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Get organization
GET/organizations/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/2"

URI example

GET https://system_domain/api/v2/organizations/2
Options
HideShow
id
number (required) Example: 2

Organization ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 2,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "EddyDesk",
    "domains": "@eddydesk.com",
    "address": "",
    "phone": "",
    "email": "",
    "web": "https://eddydesk.com",
    "minute_limit": 0,
    "employees": [
      1506760,
      1506763,
      1506743
    ],
    "managers": [],
    "custom_fields": [
      {
        "id": 89,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 90,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}

Add organization
POST/organizations/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'name=Eddydesk99&custom_fields[2]=4&custom_fields[4]=test' "https://system_domain/api/v2/organization/"

URI example

POST https://system_domain/api/v2/organizations/
Options
HideShow
name
string (required) Example: EddyDesk

Organization name

domains
string (optional) Example: @EddyDesk.com, @hde.com

Organization domains, separated by commas

address
string (optional) Example: Moscow, Russia

Address

phone
string (optional) Example: 749934687445

Phone

email
string (optional) Example: info@EddyDesk.com

Email

web
string (optional) Example: http://example.com

Website

minute_limit
number (optional) Example: 0

Allotted time for ticket execution per month (minutes)

employees
array (optional) Example: [0 => 1, 1 => 2]

Company employees

managers
array (optional) Example: [0 => 2]

Company managers

custom_fields
array (optional) Example: [87 => 'test', 2 => 1]

Array of custom contact fields, example: custom_fields[field_id] = value, in case of a associated field, the level must be specified custom_fields[field_id][level] = value

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 36,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "Eddydesk99",
    "domains": "",
    "address": "",
    "phone": "",
    "email": "",
    "web": "",
    "minute_limit": 0,
    "employees": [],
    "managers": [],
    "custom_fields": [
      {
        "id": 89,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 90,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Organization name {Eddydesk99} already exists"
    }
  ]
}

Update organization
PUT/organizations/{id}

CURL example

curl -X PUT -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/json" -H "Cache-Control: no-cache" -d '{"name":"Eddydesk2","domains":"@eddydesk.com", "custom_fields": {"6": "test", "2": "18"}}' "https://system_domain/api/v2/organizations/2"

URI example

PUT https://system_domain/api/v2/organizations/2
Options
HideShow
id
number (required) Example: 2

Organization ID

name
string (optional) Example: Eddydesk

Organization name

domains
string (optional) Example: @eddydesk.com, @hde.com

Organization domains, separated by commas

address
string (optional) Example: Moscow, Russia

Address

phone
string (optional) Example: 749934687445

Phone

email
string (optional) Example: info@eddydesk.com

Email

web
string (optional) Example: http://example.com

Website

minute_limit
number (optional) Example: 0

Allotted time for ticket execution per month (minutes)

employees
array (optional) Example: [0 => 1, 1 => 2]

Company employees

managers
array (optional) Example: [0 => 2]

Company managers

custom_fields
array (optional) Example: [87 => 'test', 2 => 1]

Array of custom contact fields, example: custom_fields[field_id] = value, in case of an associated field, the level must be specified custom_fields[field_id][level] = value

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 2,
    "date_created": "2019-01-01 00:00:00",
    "date_updated": "2019-01-01 00:00:00",
    "name": "Eddydesk2",
    "domains": "@eddydesk.com",
    "address": "adress",
    "phone": "+7 (499) 346-87-44",
    "email": "",
    "web": "https://eddydesk.com",
    "minute_limit": 10,
    "employees": [
      1506760,
      1506763,
      1506743
    ],
    "managers": [],
    "custom_fields": [
      {
        "id": 89,
        "field_type": "textarea",
        "field_value": "test"
      },
      {
        "id": 90,
        "field_type": "checkbox",
        "field_value": 1
      }
    ]
  }
}
Response  400
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-411",
      "title": "Bad request",
      "details": "Organization name {Eddydesk2} already exists"
    }
  ]
}

Delete organization
DELETE/organizations/{id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/36"

URI example

DELETE https://system_domain/api/v2/organizations/36
Options
HideShow
id
number (required) Example: 36

Organization ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Organization with id {36} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Organization with id {36} does not exist"
    }
  ]
}

Organization fields

Get organization fields
GET/organizations/custom_fields/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/"

URI example

GET https://system_domain/api/v2/organizations/custom_fields/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
"data": {
"2": {
    "id": 2,
    "name": {
        "en": "Select"
    },
    "field_type": "select",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"3": {
    "id": 3,
    "name": {
        "en": "Date"
    },
    "field_type": "date",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"4": {
    "id": 4,
    "name": {
        "ru": "Checkbox",
    },
    "field_type": "checkbox",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"5": {
    "id": 5,
    "name": {
        "en": "Text"
    },
    "field_type": "text",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": true
        }
    }
},
"6": {
    "id": 6,
    "name": {
        "en": "Textarea"
    },
    "field_type": "textarea",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"7": {
    "id": 7,
    "name": {
        "en": "Number"
    },
    "field_type": "number",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": false
        }
    }
},
"8": {
    "id": 8,
    "name": {
        "1": {
            "en": "Related"
        },
        "2": {
            "en": "Related 2"
        },
        "3": {
            "en": "Related 3"
        },
        "4": {
            "en": "Related 4"
        }
    },
    "field_type": "hierarchy",
    "permissions": {
        "staff": {
            "view": true,
            "edit": true,
            "required": false
        },
        "user": {
            "view": true,
            "edit": true,
            "required": true
        }
    }
}
},
"pagination": {
"total": 7,
"per_page": 30,
"current_page": 1,
"total_pages": 1
}
}

Get organization field
GET/organizations/custom_fields/{id}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2"

URI example

GET https://system_domain/api/v2/organizations/custom_fields/2
Options
HideShow
id
number (required) Example: 2

Field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "2": {
      "id": 2,
      "name": {
        "en": "Select"
      },
      "field_type": "select",
      "permissions": {
        "staff": {
          "view": true,
          "edit": true,
          "required": false
        },
        "user": {
          "view": true,
          "edit": true,
          "required": false
        }
      }
    }
  }
}

Organization field options

Attention

Methods are only available for fields with type (field_type): dropdown list (select) and related fields (hierarchy)!

Get options
GET/organizations/custom_fields/{custom_field_id}/options/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2/options"

URI example

GET https://system_domain/api/v2/organizations/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

Field ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 5,
      "pid": 0,
      "name": {
        "en": "1"
      }
    },
    {
      "id": 6,
      "pid": 0,
      "name": {
        "en": "2"
      }
    },
    {
      "id": 7,
      "pid": 0,
      "name": {
        "en": "3"
      }
    },
    {
      "id": 171,
      "pid": 0,
      "name": {
        "en": "4"
      }
    }
  ],
  "pagination": {
    "total": 4,
    "per_page": 50,
    "current_page": 1,
    "total_pages": 1
  }
}

Add/update options
POST/organizations/custom_fields/{custom_field_id}/options/

CURL example

Add/update options

The general limit for adding/updating options is 100 entries per request. The required option parameter is name.

  • To add a new option, you must specify name - {"options":[{"name":{"en":"new option","en":"new option","ua":"new option"}}]}

  • To add a new option for associated fields at any level - use pid (id of the parent option) - {"options":[{"pid": 21, "name":{"en" :"new option","en":"new option","ua":"new option"}}]}

  • To update an existing option, use the id parameter, only the name parameter is available for changes - {"options":[{"id": 20,"name":{"en":"update option ","en":"update option","ua":"update option"}}]}

Moving associated field options across levels is prohibited. All new options are added to the end of the list. This query will return all affected options as a result.

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" -H 'content-type: application/json' -d '{"options":[{"name":{"ru":"new option","en":"new option","ua":"new option"}}, {"pid": 21, "name":{"ru":"new option","en":"new option","ua":"new option"}}, {"id": 20,"name":{"ru":"update option","en":"update option","ua":"update option"}}]}' "https://system_domain/api/v2users/organizations/custom_fields/2/options"

URI example

POST https://system_domain/api/v2/organizations/custom_fields/2/options/
Options
HideShow
custom_field_id
number (required) Example: 2

Field ID

options
array (required) Example: {"options":[{"id": "20", "name":{"ru":"update option","en":"update option","ua":"update option"}}]}

Add/Update Options

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 20,
      "pid": 0,
      "name": {
        "en": "update option"
      }
    },
    {
      "id": 233,
      "pid": 0,
      "name": {
        "en": "new option"
      }
    },
    {
      "id": 234,
      "pid": 21,
      "name": {
        "en": "new option"
      }
    }
  ]
}

Delete option
DELETE/organizations/custom_fields/{custom_field_id}/options/{option_id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/custom_fields/2/options/233"

URI example

DELETE https://system_domain/api/v2/organizations/custom_fields/233/options/233
Options
HideShow
custom_field_id
number (required) Example: 233

field ID

option_id
number (required) Example: 233

option ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Option with id {233} successfully deleted"
    }
  ]
}

Organization notes

Get note
GET/organizations/{organiz_id}/notes/{?page}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/2/notes"

URI example

GET https://system_domain/api/v2/organizations/2/notes/?page=1
Options
HideShow
organiz_id
number (required) Example: 2

Organization ID

page
number (optional) Example: 1

Page number

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 83,
      "creator_id": 1,
      "organiz_id": 2,
      "text": "",
      "date_created": "20:02:05 19.03.2019",
      "date_updated": "20:02:05 19.03.2019",
      "file": {
        "name": "test2.png",
        "url": "https://system_domain/en/file/download/154356e5b627857e09f937192abcbc671e778dc3",
        "data_type": "png"
      }
    },
    {
      "id": 82,
      "creator_id": 1,
      "organiz_id": 2,
      "text": "test2",
      "date_created": "20:01:27 19.03.2019",
      "date_updated": "20:02:10 19.03.2019",
      "file": []
    }
  ],
  "pagination": {
    "total": 2,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Organization with id {2} does not exist"
    }
  ]
}

Add note
POST/organizations/{organiz_id}/notes/

CURL example

curl -X POST -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Content-Type: application/x-www-form-urlencoded" -H "Cache-Control: no-cache" -d 'text=test' "https://system_domain/api/v2/organizations/2/notes"

URI example

POST https://system_domain/api/v2/organizations/2/notes/
Options
HideShow
organiz_id
number (required) Example: 2

User ID

text
string (optional) Example: test

Note text

file
file (optional) 

Note file

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "id": 84,
    "creator_id": 1,
    "organiz_id": 2,
    "text": "test",
    "date_created": "20:07:10 19.03.2019",
    "date_updated": "20:07:10 19.03.2019",
    "file": []
  }
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "e-404",
      "title": "Not found",
      "details": "Organization with id {2} does not exist"
    }
  ]
}

Delete note
DELETE/organizations/{organiz_id}/notes/{note_id}

CURL example

curl -X DELETE -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/organizations/22/notes/80"

URI example

DELETE https://system_domain/api/v2/organizations/2/notes/80
Options
HideShow
organiz_id
number (required) Example: 2

User ID

note_id
number (required) Example: 80

Note ID

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Note with id {85} successfully deleted"
    }
  ]
}
Response  404
HideShow
Title
Content-Type: application/json
Body
{
  "errors": [
    {
      "code": "s-204",
      "title": "No content",
      "details": "Note with id {85} in organizations with id {2} does not exist"
    }
  ]
}

Groups

List of groups
GET/groups/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/groups"

URI example

GET https://system_domain/api/v2/groups/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": 1,
      "type": "user",
      "name": {
        "ru": "Клиент",
        "en": "Client",
        "ua": "Клиент"
      },
      "disable": 0
    },
    {
      "id": 2,
      "type": "staff",
      "name": {
        "ru": "Администратор",
        "en": "Administrator",
        "ua": "Администратор"
      },
      "disable": 0
    },
    {
      "id": 3,
      "type": "staff",
      "name": {
        "ru": "Сотрудник",
        "en": "Employee",
        "ua": "Сотрудник"
      },
      "disable": 0
    }
  ]
}

Statuses

List of user statuses
GET/user_statuses/

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/user_statuses"

URI example

GET https://system_domain/api/v2/user_statuses/
Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": [
    {
      "id": "online",
      "name": {
        "en": "Online"
      },
      "color": "#67c23a"
    },
    {
      "id": "on-hold",
      "name": {
        "en": "On hold"
      },
      "color": "#e6a23c"
    },
    {
      "id": "obed",
      "name": {
        "en": "Lunch break"
      },
      "color": "#28D611"
    },
    {
      "id": "offline",
      "name": {
        "en": "Offline"
      },
      "color": "#f56c6c"
    }
  ]
}

Knowledge Base

Knowledge base API overview

API responses are always filtered according to the permissions of the user on whose behalf the API request is made. For example, when a user requests a list of articles in a section, the API returns only those articles that the user can view in the knowledge base. The exception is public categories and articles, all users will get the same response.

Speed limits

The knowledge base API is limited in speed, the default limit is 60 requests per minute (RPM). Knowledge base API limits do not count against other API limits. If the limit is exceeded, access will be automatically blocked for 1 hour.

You can use the following response headers to confirm the current speed limit for the system and keep track of the number of requests remaining in the current minute:

X-Rate-Limit: 60
X-Rate-Limit-Remaining: 59

EddyDesk reserves the right to adjust the speed limit and blocking time for the knowledge base API to ensure high quality service for all customers.

Categories

List of categories
GET/knowledge_base/categories{?page,public,parent_list,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/knowledge_base/categories?page=1"

URI example

GET https://system_domain/api/v2/knowledge_base/categories?page=1&public=false&parent_list=1,2,3&from_date_created=2017-12-31 00:00:00&to_date_created=2017-12-31 00:00:00&from_date_updated=2017-12-31 00:00:00&to_date_updated=2017-12-31 00:00:00&order_by=position
Options
HideShow
page
number (optional) Example: 1

Page number

public
boolean (optional) Example: false

Search by public categories

parent_list
string (optional) Example: 1,2,3

Search for categories by parent categories, separated by commas

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

from_date_updated
string (optional) Example: 2017-12-31 00:00:00

Update date from

to_date_updated
string (optional) Example: 2017-12-31 00:00:00

Update date before

order_by
string (optional) Example: position

Sorting categories, can be specified separated by commas. Categories can be sorted by parameters: date_created, date_updated, position. The sort order is {asc} (ascending) and {desc} (descending). Default value: position{asc}

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "1": {
      "id": 1,
      "parent_id": 0,
      "position": 23,
      "date_created": "2017-03-24 15:47:01",
      "date_updated": "2019-03-05 20:19:40",
      "access": "staff",
      "access_by_groups": [
        1,
        3,
        2
      ],
      "title": {
        "en": "test category 1"
      }
    },
    "2": {
      "id": 2,
      "parent_id": 1,
      "position": 21,
      "date_created": "2017-05-29 11:57:24",
      "date_updated": "2018-12-06 15:25:57",
      "access": "user",
      "access_by_groups": [
        3,
        5,
        6,
        7,
        8,
        10,
        11,
        2
      ],
      "title": {
        "en": "test category 2"
      }
    },
    "-1": {
      "id": -1,
      "parent_id": 0,
      "position": 1,
      "date_created": "2015-12-31 23:00:00",
      "date_updated": "2019-01-30 15:54:21",
      "access": "public",
      "access_by_groups": [
        1,
        3,
        2
      ],
      "title": {
        "en": "Templates"
      }
    },
    "-2": {
      "id": -2,
      "parent_id": 0,
      "position": 3,
      "date_created": "2018-01-01 00:00:00",
      "date_updated": "2019-03-16 01:06:45",
      "access": "user",
      "access_by_groups": [
        1,
        3,
        2
      ],
      "title": {
        "en": "News"
      }
    }
  },
  "pagination": {
    "total": 4,
    "per_page": 30,
    "current_page": 1,
    "total_pages": 1
  }
}

Articles

List of articles
GET/knowledge_base/articles{?page,public,from_date_created,to_date_created,from_date_updated,to_date_updated,order_by}

CURL example

curl -X GET -H "Authorization: Basic bmlraXRhLmFudG9ub3ZAaGVscGRlc2tlZGR5LmNvbTphMzI4NThiNC1hNjVlLTQ5ZWYtYTk2MC0wYjdlOGQ1ZDFlNDc=" -H "Cache-Control: no-cache" "https://system_domain/api/v2/knowledge_base/articles?page=1"

URI example

GET https://system_domain/api/v2/knowledge_base/articles?page=1&public=false&from_date_created=2017-12-31 00:00:00&to_date_created=2017-12-31 00:00:00&from_date_updated=2017-12-31 00:00:00&to_date_updated=2017-12-31 00:00:00&order_by=views
Options
HideShow
page
number (optional) Example: 1

Page number

public
boolean (optional) Example: false

Search for public articles

category_list
string (optional) Example: 1,2,3

Search for articles by category, separated by commas

from_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date from

to_date_created
string (optional) Example: 2017-12-31 00:00:00

Creation date before

from_date_updated
string (optional) Example: 2017-12-31 00:00:00

Update date from

to_date_updated
string (optional) Example: 2017-12-31 00:00:00

Update date before

order_by
string (optional) Example: views

Sorting of articles, can be specified separated by commas. Articles can be sorted by parameters: date_created, date_updated, views, pin. The sort order is {asc} (ascending) and {desc} (descending). Default value: date_created{desc}

Response  200
HideShow
Title
Content-Type: application/json
Body
{
  "data": {
    "56": {
      "id": 56,
      "date_created": "2018-07-17 15:15:00",
      "date_updated": "2018-07-24 17:12:55",
      "show_me_only": false,
      "access": "public",
      "pin": false,
      "views_count": 130,
      "categories": [
        1
      ],
      "title": {
        "en": "test article"
      },
      "tags": {
        "en": []
      },
      "body": {
        "en": "<p>test body</p>"
      },
      "files": []
    },
    "57": {
      "id": 57,
      "date_created": "2018-07-17 15:15:00",
      "date_updated": "2018-07-24 17:27:27",
      "show_me_only": false,
      "access": "staff",
      "pin": false,
      "views_count": 43,
      "categories": [
        1,
        2
      ],
      "title": {
        "en": "test article"
      },
      "tags": {
        "ru": [
          "test",
          "info"
        ],
        "en": []
      },
      "body": {
        "en": "<p>test body</p>"
      },
      "files": []
    },
    "58": {
      "id": 58,
      "date_created": "2018-07-17 15:15:00",
      "date_updated": "2018-07-17 15:15:00",
      "show_me_only": false,
      "access": "user",
      "pin": false,
      "views_count": 3,
      "categories": [
        2
      ],
      "title": {
        "en": "test article"
      },
      "tags": {
        "en": []
      },
      "body": {
        "en": "<p>test body</p>"
      },
      "files": []
    },
    "60": {
      "id": 60,
      "date_created": "2018-07-24 17:24:00",
      "date_updated": "2019-02-01 18:04:21",
      "show_me_only": false,
      "access": "public",
      "pin": false,
      "views_count": 32,
      "categories": [
        -2,
        2
      ],
      "title": {
        "en": "test article"
      },
      "tags": {
        "en": []
      },
      "body": {
        "en": "<p>test body</p>"
      },
      "files": [
        {
          "name": "test.gif",
          "url": "https://system_domain/en/knowledge_base/download/60/file/f8bb43e593d867d27c965d38dfec721fbb084cf9",
          "data_type": "gif"
        },
        {
          "name": "test.png",
          "url": "https://system_domain/en/knowledge_base/download/60/file/b818daf594dd3b61098cce7fef7954bc0314edd5",
          "data_type": "png"
        }
      ]
    }
  },
  "pagination": {
    "total": 4,
    "per_page": 10,
    "current_page": 1,
    "total_pages": 1
  }
}

Additional features

API versions

Overview

If you have any questions related to changes in the API, please contact support@eddydesk.com or any convenient channel.

Sincerely, EddyDesk team

Current version

10.11.2021

  • Added API limit headers

01.10.2021

Update 3.1

16.04.2021

15.02.2021

27.01.2021

  • Added filters to the List of users method:
    • id_list - allows you to get multiple users by ID
    • organization_list - allows you to get users by organization ID

Update 3.0

20.10.2020

  • Links with Jira issues added to tickets (field jira_issues)

31.08.2020

  • A parent has been added to requests (the pid field), the parent can be specified when creating an application

  • 5 new types of fields have been added to order methods and order field methods. New types: Multi-button, Button,File,Time,Regular expression.

12.08.2020

  • Added tags to requests (field tags)

Update 2.97

25.05.2020

  • Added the event field and the event_list filter to the audit-request method

01.07.2020

Update 2.96

21.04.2020

  • Added knowledge base API in BETA mode

  • Added group filter (group_list) to list of users

10.04.2020

Breaking changes in ticket, user, and organization fields

The changes concern the methods:

To optimize the work with the fields, pagination has been added, in the future 30 fields per page. The options fields parameter will be disabled, separate methods for working with options for drop-down lists and related fields have been added to the API. We recommend switching to new methods of working with options.

The changes will take effect no earlier than 11/01/2020, the deadline may be delayed due to active API integrations. The new mode of operation can be enabled on systems upon request to the support team. If you need to delay changes or help with the transition - please contact our support team.

Current limit of 300 fields per page, options field available

13.03.2020

  • New types of events have been added to the application-audit method

  • Records about events performed by the system (dispatcher, SLA, sending emails, etc.)

  • Added user_list filter to audit request method

25.02.2020

  • Added ldap_username field to users and search

  • Added 2 filters to audit request

    • from_date_created - from creation date
    • to_date_created - before creation date

29.01.2020

  • Added a new field source of the request (source) to requests

  • Limits ban time changed from 48 hours to 20 minutes due to more frequent bans. Time is subject to change.

Update 2.95

03.10.2019

  • Added language field (language) to users

  • The ability to change the email field has been added to the update user method

19.09.2019

  • Added 3 new application fields
    • cc - array of CC mailboxes of the request
    • bcc - array of BCC request mailboxes
    • followers - an array of users watching the request