Back to top

SupportPal API Documentation

Core

Brand

Brands are a single customer facing identity, many brands can operate under a single help desk.

Show all of the records.
GET/api/core/brand

Example URI

GET /api/core/brand
URI Parameters
HideShow
enabled
boolean (optional) 

If the brand is enabled

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "MyCompany2",
      "enabled": 1,
      "system_url": "http://support.mycompany2.com/",
      "frontend_logo": "",
      "frontend_template": "default",
      "default_email": "support@mycompany2.com",
      "global_email_header": "",
      "global_email_footer": "",
      "email_method": "default",
      "smtp_host": "",
      "smtp_port": 0,
      "smtp_encryption": 0,
      "smtp_requires_auth": 0,
      "smtp_username": "",
      "smtp_password": "",
      "default_country": "default",
      "default_timezone": "default",
      "date_format": "default",
      "time_format": "default",
      "default_language": "default",
      "language_toggle": 2,
      "created_at": 1476785455,
      "updated_at": 1477050455
    }
  ]
}

Display the specified resource.
GET/api/core/brand/{id}

Example URI

GET /api/core/brand/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "MyCompany2",
    "enabled": 1,
    "system_url": "http://support.mycompany2.com/",
    "frontend_logo": "",
    "frontend_template": "default",
    "default_email": "support@mycompany2.com",
    "global_email_header": "",
    "global_email_footer": "",
    "email_method": "default",
    "smtp_host": "",
    "smtp_port": 0,
    "smtp_encryption": 0,
    "smtp_requires_auth": 0,
    "smtp_username": "",
    "smtp_password": "",
    "default_country": "default",
    "default_timezone": "default",
    "date_format": "default",
    "time_format": "default",
    "default_language": "default",
    "language_toggle": 2,
    "created_at": 1476785455,
    "updated_at": 1477050455
  }
}

IP Ban

Banned IPs that are not allowed to login to either the frontend, operator panel or API (or some combination). Includes manually added bans as well as automatic bans as a result of a number of incorrect logins.

Show all of the records.
GET/api/core/ipban

Example URI

GET /api/core/ipban
URI Parameters
HideShow
ip
string (optional) 

Search with an exact IP address.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "ip": "192.168.1.2",
      "reason": "Abuse",
      "event_user": 1,
      "event_operator": 1,
      "event_api": 1,
      "type": 1,
      "expiry": null,
      "created_at": 1446383939,
      "updated_at": 1446383939
    }
  ]
}

Display the specified resource.
GET/api/core/ipban/{id}

Example URI

GET /api/core/ipban/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "ip": "192.168.1.2",
    "reason": "Abuse",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "type": 1,
    "expiry": null,
    "created_at": 1446383939,
    "updated_at": 1446383939
  }
}

Store a newly created resource in storage.
POST/api/core/ipban

Example URI

POST /api/core/ipban
URI Parameters
HideShow
ip
string (required) 

The IP address being banned.

reason
string (optional) 

A reason for the IP ban.

type
boolean (required) 

If the ban is permaneant (1) or temporary (0).

event_user
boolean (optional) Default: 1 

The ban should not let this IP log in as a user on the frontend.

event_operator
boolean (optional) Default: 1 

The ban should not let this IP log in as an operator.

event_api
boolean (optional) Default: 1 

The ban should not let this IP use the API.

expiry_time
integer (optional) 

A unix timestamp at when the ban should expire, only needed for temporary bans, will default to 24 hours if not entered.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=192.168.1.2&reason=Abuse&type=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new ban!",
  "data": {
    "id": 1,
    "ip": "192.168.1.2",
    "reason": "Abuse",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "type": 1,
    "expiry": null,
    "created_at": 1446383939,
    "updated_at": 1446383939
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The ip field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/core/ipban/{id}

Example URI

PUT /api/core/ipban/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

ip
string (optional) 

The IP address being banned.

reason
string (optional) 

A reason for the IP ban.

type
boolean (optional) 

If the ban is permaneant (1) or temporary (0).

event_user
boolean (optional) 

The ban should not let this IP log in as a user on the frontend.

event_operator
boolean (optional) 

The ban should not let this IP log in as an operator.

event_api
boolean (optional) 

The ban should not let this IP use the API.

expiry_time
integer (optional) 

A unix timestamp at when the ban should expire, only needed for temporary bans, will default to 24 hours if not entered.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=192.168.1.2&reason=Abuse&type=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the ban!",
  "data": {
    "id": 1,
    "ip": "192.168.1.2",
    "reason": "Abuse",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "type": 1,
    "expiry": null,
    "created_at": 1446383939,
    "updated_at": 1446383939
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The ban with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/core/ipban/{id}

Example URI

DELETE /api/core/ipban/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the ban!",
  "data": null
}

IP Whitelist

Known IP addresses that will not be banned on failed logins.

Show all of the records.
GET/api/core/ipwhitelist

Example URI

GET /api/core/ipwhitelist
URI Parameters
HideShow
ip
string (optional) 

Search with an exact IP address.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "ip": "127.0.0.1",
      "description": "Localhost",
      "event_user": 1,
      "event_operator": 1,
      "event_api": 1,
      "created_at": 1446399514,
      "updated_at": 1446399514
    }
  ]
}

Display the specified resource.
GET/api/core/ipwhitelist/{id}

Example URI

GET /api/core/ipwhitelist/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "ip": "127.0.0.1",
    "description": "Localhost",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "created_at": 1446399514,
    "updated_at": 1446399514
  }
}

Store a newly created resource in storage.
POST/api/core/ipwhitelist

Example URI

POST /api/core/ipwhitelist
URI Parameters
HideShow
ip
string (required) 

The IP address being whitelisted.

description
string (optional) 

A description of the IP being whitelisted.

event_user
boolean (optional) Default: 1 

The whitelisting should apply when logging in as a user on the frontend.

event_operator
boolean (optional) Default: 1 

The whitelisting should apply when logging in as an operator.

event_api
boolean (optional) Default: 1 

The whitelisting should apply when using the API.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=127.0.0.1&description=Localhost
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new whitelisted ip!",
  "data": {
    "id": 1,
    "ip": "127.0.0.1",
    "description": "Localhost",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "created_at": 1446399514,
    "updated_at": 1446399514
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The ip field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/core/ipwhitelist/{id}

Example URI

PUT /api/core/ipwhitelist/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

ip
string (optional) 

The IP address being whitelisted.

description
string (optional) 

A description of the IP being whitelisted.

event_user
boolean (optional) 

The whitelisting should apply when logging in as a user on the frontend.

event_operator
boolean (optional) 

The whitelisting should apply when logging in as an operator.

event_api
boolean (optional) 

The whitelisting should apply when using the API.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
ip=127.0.0.1&description=Localhost
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the whitelisted ip!",
  "data": {
    "id": 1,
    "ip": "127.0.0.1",
    "description": "Localhost",
    "event_user": 1,
    "event_operator": 1,
    "event_api": 1,
    "created_at": 1446399514,
    "updated_at": 1446399514
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The whitelisted ip with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/core/ipwhitelist/{id}

Example URI

DELETE /api/core/ipwhitelist/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the whitelisted ip!",
  "data": null
}

Spam Rules

The rules that are used to determine when incoming tickets and other content are considered spam.

Show all of the records.
GET/api/core/spamrule

Example URI

GET /api/core/spamrule
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "text": "Pills",
      "event_message": 1,
      "event_comment": 1,
      "type": 0,
      "created_at": 1446400836,
      "updated_at": 1446400836
    }
  ]
}

Display the specified resource.
GET/api/core/spamrule/{id}

Example URI

GET /api/core/spamrule/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "text": "Pills",
    "event_message": 1,
    "event_comment": 1,
    "type": 0,
    "created_at": 1446400836,
    "updated_at": 1446400836
  }
}

Store a newly created resource in storage.
POST/api/core/spamrule

Example URI

POST /api/core/spamrule
URI Parameters
HideShow
text
string (required) 

The text to check against, can be regex, case-insensitive.

type
integer (required) 

What should be checked, 0 - Content, 1 - Sender, 2 - Content & Sender.

event_message
boolean (optional) Default: 1 

Check against ticket messages.

event_comment
boolean (optional) Default: 1 

Check against article comments.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=Pills&type=0
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new spam rule!",
  "data": {
    "id": 1,
    "text": "Pills",
    "event_message": 1,
    "event_comment": 1,
    "type": 0,
    "created_at": 1446400836,
    "updated_at": 1446400836
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The text field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/core/spamrule/{id}

Example URI

PUT /api/core/spamrule/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

text
string (optional) 

The text to check against, can be regex, case-insensitive.

type
integer (optional) 

What should be checked, 0 - Content, 1 - Sender, 2 - Content & Sender.

event_message
boolean (optional) 

Check against ticket messages.

event_comment
boolean (optional) 

Check against article comments.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=Pills&type=0
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the spam rule!",
  "data": {
    "id": 1,
    "text": "Pills",
    "event_message": 1,
    "event_comment": 1,
    "type": 0,
    "created_at": 1446400836,
    "updated_at": 1446400836
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The spam rule with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/core/spamrule/{id}

Example URI

DELETE /api/core/spamrule/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the spam rule!",
  "data": null
}

Settings

Core system settings.

General Settings
GET/api/core/settings

Example URI

GET /api/core/settings
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "active_plugins": "",
    "admin_folder": "admin",
    "date_format": "d/m/Y",
    "default_country": "GB",
    "default_frontend_language": "en",
    "default_operator_language": "en",
    "default_email": "email@yourcompany.com",
    "default_timezone": "Europe/London",
    "enable_ssl": "0",
    "force_operator_ssl": "0",
    "frontend_language": "1",
    "frontend_template": "default",
    "is_installed": "1",
    "language_frontend_toggle": "1",
    "language_operator_toggle": "1",
    "maintenance_mode": "0",
    "operator_language": "1",
    "operator_template": "default",
    "simpleauth_key": "g3SMCtWwNoeLTYqMCruFlMXEwjyUVQKj",
    "time_format": "g:i A"
  }
}

User

User

User accounts.

Show all of the records.
GET/api/user/user

Example URI

GET /api/user/user
URI Parameters
HideShow
brand_id
integer (optional) 

Search for users by the brand they’re registered to.

firstname
string (optional) 

Search for users by their first name.

lastname
string (optional) 

Search for users by their last name.

email
string (optional) 

Search for users by email.

confirmed
boolean (optional) 

Search for users that are confirmed (1) or not (0).

organisation_id
integer (optional) 

Search for users by their organisation ID.

organisation_name
string (optional) 

Search for users by their organisation name.

country
intstringeger (optional) 

Search for users by their two letter country code like ‘GB’.

language_code
string (optional) 

Search for users by their two letter language code like ‘en’.

customfield
array (optional) 

Search for users by their custom field values, key the array by the custom field ID.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "brand_id": 1,
      "firstname": "Joe",
      "lastname": "Bloggs",
      "email": "jbloggs@email.com",
      "confirmed": 1,
      "organisation_id": null,
      "organisation_access_level": null,
      "country": null,
      "language_code": null,
      "timezone": null,
      "avatar": null,
      "twofa_enabled": 0,
      "twofa_secret": null,
      "twofa_token": null,
      "twitter_id": null,
      "twitter_handle": null,
      "facebook_id": null,
      "created_at": 1445611944,
      "updated_at": 1445611959,
      "formatted_name": "Joe Bloggs",
      "groups": [],
      "customfields": []
    }
  ]
}

Display the specified resource.
GET/api/user/user/{id}

Example URI

GET /api/user/user/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "brand_id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "avatar": null,
    "twofa_enabled": 0,
    "twofa_secret": null,
    "twofa_token": null,
    "twitter_id": null,
    "twitter_handle": null,
    "facebook_id": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs",
    "groups": [],
    "customfields": []
  }
}

Store a newly created resource in storage.
POST/api/user/user

Example URI

POST /api/user/user
URI Parameters
HideShow
brand_id
integer (optional) 

The brand the user is being registered to, will use the default brand if not entered.

firstname
string (optional) 

The first name of the user.

lastname
string (optional) 

The last name of the user.

email
string (required) 

The user’s email address.

password
string (required) 

The user’s password.

country
string (optional) 

The user’s country, as a two letter string like ‘GB’.

language_code
string (optional) 

The two letter language code, like ‘en’, will default to system default if not entered.

timezone
string (optional) 

The timezone of the user, like ‘Europe/London’, will default to system default if not entered.

confirmed
boolean (optional) Default: 0 

If the user is confirmed and can login.

organisation
string (optional) 

If creating a new organisation, use this field.

organisation_id
integer (optional) 

If adding to an existing organisation, enter the organisation ID.

organisation_access_level
boolean (optional) 

The access level in the organisation, either Manager (0) or User (1). Defaults to 0 for new organisation, 1 for existing organisation. Only needed with the ‘organisation_id’ field.

organisation_notifications
boolean (optional) 

If user is an organisation manager or owner, should they receive emails on updates for tickets opened by other organisation users.

customfield
array (optional) 

An array of custom fields values, keyed by their ID.

groups
array (optional) 

An array of group IDs that the user belongs to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new user!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs",
    "groups": [],
    "customfields": []
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/user/user/{id}

Example URI

PUT /api/user/user/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

firstname
string (optional) 

The first name of the user.

lastname
string (optional) 

The last name of the user.

email
string (optional) 

The user’s email address.

password
string (optional) 

The user’s password.

country
string (optional) 

The user’s country, as a two letter string like ‘GB’.

language_code
string (optional) 

The two letter language code, like ‘en’, will default to system default if not entered.

timezone
string (optional) 

The timezone of the user, like ‘Europe/London’, will default to system default if not entered.

confirmed
boolean (optional) Default: 0 

If the user is confirmed and can login.

organisation
string (optional) 

If creating a new organisation or updating the existing name, use this field.

organisation_id
integer (optional) 

The ID of the organisation, use instead of ‘organisation’ if the organisation already exists. If you wish to remove the user from the organisation they are currently associated with, set as 0.

organisation_access_level
boolean (optional) 

The access level in the organisation, either Manager (0) or User (1). Only needed with the ‘organisation_id’ field.

organisation_notifications
boolean (optional) 

If user is an organisation manager or owner, should they receive emails on updates for tickets opened by other organisation users.

customfield
array (optional) 

An array of custom fields values, keyed by their ID.

groups
array (optional) 

An array of group IDs that the user belongs to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the user!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "avatar": null,
    "twofa_enabled": 0,
    "twofa_secret": null,
    "twofa_token": null,
    "twitter_id": null,
    "twitter_handle": null,
    "facebook_id": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs"
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The user with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/user/{id}

Example URI

DELETE /api/user/user/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the user!",
  "data": null
}

Operator

Staff accounts.

Show all of the records.
GET/api/user/operator

Example URI

GET /api/user/operator
URI Parameters
HideShow
email
string (optional) 

Search for operators by email.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "firstname": "Joe",
      "lastname": "Bloggs",
      "email": "jbloggs@email.com",
      "confirmed": 1,
      "organisation_id": null,
      "organisation_access_level": null,
      "country": null,
      "language_code": null,
      "timezone": null,
      "avatar": null,
      "twofa_enabled": 0,
      "twofa_secret": null,
      "twofa_token": null,
      "twitter_id": null,
      "twitter_handle": null,
      "facebook_id": null,
      "created_at": 1445611944,
      "updated_at": 1445611959,
      "formatted_name": "Joe Bloggs",
      "groups": []
    }
  ]
}

Display the specified resource.
GET/api/user/operator/{id}

Example URI

GET /api/user/operator/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "avatar": null,
    "twofa_enabled": 0,
    "twofa_secret": null,
    "twofa_token": null,
    "twitter_id": null,
    "twitter_handle": null,
    "facebook_id": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs",
    "groups": []
  }
}

Store a newly created resource in storage.
POST/api/user/operator

Example URI

POST /api/user/operator
URI Parameters
HideShow
firstname
string (required) 

The first name of the operator.

lastname
string (required) 

The last name of the operator.

email
string (required) 

The operator’s email address.

password
string (required) 

The operator’s password.

country
string (optional) 

The operator’s country, as a two letter string like ‘GB’.

language_code
string (optional) 

The two letter language code, like ‘en’, will default to system detault if not entered.

timezone
string (optional) 

The timezone of the operator, like ‘Europe/London’, will default to system detault if not entered.

confirmed
boolean (optional) Default: 0 

If the operator is confirmed and can login (1).

groups
array (required) 

An array of group IDs that the operator belongs to. Requires at least one operator group.

depts
array (optional) 

An array of department IDs that the operator belongs to. These are in addition to any departments the operator is assigned to through their groups.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new operator!",
  "data": {
    "id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs",
    "groups": []
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/user/operator/{id}

Example URI

PUT /api/user/operator/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

firstname
string (optional) 

The first name of the operator.

lastname
string (optional) 

The last name of the operator.

email
string (optional) 

The operator’s email address.

password
string (optional) 

The operator’s password.

country
string (optional) 

The operator’s country, as a two letter string like ‘GB’.

language_code
string (optional) 

The two letter language code, like ‘en’, will default to system detault if not entered.

timezone
string (optional) 

The timezone of the operator, like ‘Europe/London’, will default to system detault if not entered.

confirmed
boolean (optional) Default: 0 

If the operator is confirmed and can login (1).

groups
array (optional) 

An array of group IDs that the operator belongs to.

depts
array (optional) 

An array of department IDs that the operator belongs to. These are in addition to any departments the operator is assigned to through their groups.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the operator!",
  "data": {
    "id": 1,
    "firstname": "Joe",
    "lastname": "Bloggs",
    "email": "jbloggs@email.com",
    "confirmed": 1,
    "organisation_id": null,
    "organisation_access_level": null,
    "country": null,
    "language_code": null,
    "timezone": null,
    "avatar": null,
    "twofa_enabled": 0,
    "twofa_secret": null,
    "twofa_token": null,
    "twitter_id": null,
    "twitter_handle": null,
    "facebook_id": null,
    "created_at": 1445611944,
    "updated_at": 1445611959,
    "formatted_name": "Joe Bloggs",
    "groups": []
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The operator with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/operator/{id}

Example URI

DELETE /api/user/operator/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the operator!",
  "data": null
}

Organisation

Users can be part of organisations, allowing other users to view and reply to their tickets.

Show all of the records.
GET/api/user/organisation

Example URI

GET /api/user/organisation
URI Parameters
HideShow
brand_id
integer (optional) 

Search for organisations by the brand they’re registered to.

customfield
array (optional) 

Search for organisations by their custom field values, key the array by the custom field ID.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "brand_id": 1,
      "owner_id": 1,
      "name": "Acme Ltd.",
      "country": "GB",
      "language_code": "en",
      "timezone": "Europe/London",
      "notes": "",
      "created_at": 1458660548,
      "updated_at": 1474395768,
      "users": [
        {
          "id": 1,
          "firstname": "Joe",
          "lastname": "Bloggs",
          "email": "jbloggs@email.com",
          "confirmed": 1,
          "organisation_id": 1,
          "organisation_access_level": 0,
          "country": "GB",
          "language_code": "en",
          "timezone": "Europe/London",
          "avatar": null,
          "twofa_enabled": 0,
          "twofa_secret": null,
          "twofa_token": null,
          "twitter_id": null,
          "twitter_handle": null,
          "facebook_id": null,
          "created_at": 1445613240,
          "updated_at": 1446314521,
          "formatted_name": "Joe Bloggs"
        }
      ],
      "customfields": [
        {
          "id": 1,
          "field_id": 1,
          "organisation_id": 1,
          "value": "http://www.acmeltd.co.uk",
          "created_at": 1474365413,
          "updated_at": 1474365413
        }
      ]
    }
  ]
}

Display the specified resource.
GET/api/user/organisation/{id}

Example URI

GET /api/user/organisation/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "brand_id": 1,
    "owner_id": 1,
    "name": "Acme Ltd.",
    "country": "GB",
    "language_code": "en",
    "timezone": "Europe/London",
    "notes": "",
    "created_at": 1458660548,
    "updated_at": 1474395768,
    "users": [
      {
        "id": 1,
        "firstname": "Joe",
        "lastname": "Bloggs",
        "email": "jbloggs@email.com",
        "confirmed": 1,
        "organisation_id": 1,
        "organisation_access_level": 0,
        "country": "GB",
        "language_code": "en",
        "timezone": "Europe/London",
        "avatar": null,
        "twofa_enabled": 0,
        "twofa_secret": null,
        "twofa_token": null,
        "twitter_id": null,
        "twitter_handle": null,
        "facebook_id": null,
        "created_at": 1445613240,
        "updated_at": 1446314521,
        "formatted_name": "Joe Bloggs"
      }
    ],
    "customfields": [
      {
        "id": 1,
        "field_id": 1,
        "organisation_id": 1,
        "value": "http://www.acmeltd.co.uk",
        "created_at": 1474365413,
        "updated_at": 1474365413
      }
    ]
  }
}

Store a newly created resource in storage.
POST/api/user/organisation

Example URI

POST /api/user/organisation
URI Parameters
HideShow
brand_id
integer (optional) 

The brand the organisation is being registered to, will use the default brand if not entered. Users in the organisation will need to be from the same brand.

name
string (required) 

The name of the organisation.

customfield
array (optional) 

An array of custom fields values, keyed by their ID.

country
string (optional) 

The country the organisation is based in, as a two letter string like ‘GB’.

language_code
string (optional) 

The organisation’s language, two letter code, like ‘en’, will default to system default if not entered.

timezone
string (optional) 

The organisation’s timezone, like ‘Europe/London’, will default to system default if not entered.

notes
string (optional) 

Any notes about the organisation, for operators only.

access_level
array (optional) 

An array of user access levels in organisation, keyed by the user ID. 0 - Manager, 1 - User.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Acme
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new organisation!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "owner_id": 1,
    "name": "Acme Ltd.",
    "country": "GB",
    "language_code": "en",
    "timezone": "Europe/London",
    "notes": "",
    "created_at": 1458660548,
    "updated_at": 1474395768,
    "users": [
      {
        "id": 1,
        "firstname": "Joe",
        "lastname": "Bloggs",
        "email": "jbloggs@email.com",
        "confirmed": 1,
        "organisation_id": 1,
        "organisation_access_level": 0,
        "country": "GB",
        "language_code": "en",
        "timezone": "Europe/London",
        "avatar": null,
        "twofa_enabled": 0,
        "twofa_secret": null,
        "twofa_token": null,
        "twitter_id": null,
        "twitter_handle": null,
        "facebook_id": null,
        "created_at": 1445613240,
        "updated_at": 1446314521,
        "formatted_name": "Joe Bloggs"
      }
    ],
    "customfields": [
      {
        "id": 1,
        "field_id": 1,
        "organisation_id": 1,
        "value": "http://www.acmeltd.co.uk",
        "created_at": 1474365413,
        "updated_at": 1474365413
      }
    ]
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/user/organisation/{id}

Example URI

PUT /api/user/organisation/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the organisation.

customfield
array (optional) 

An array of custom fields values, keyed by their ID.

country
string (optional) 

The country the organisation is based in, as a two letter string like ‘GB’.

language_code
string (optional) 

The organisation’s language, two letter code, like ‘en’, will default to system default if not entered.

timezone
string (optional) 

The organisation’s timezone, like ‘Europe/London’, will default to system default if not entered.

notes
string (optional) 

Any notes about the organisation, for operators only.

access_level
array (optional) 

An array of user access levels in organisation, keyed by the user ID. 0 - Manager, 1 - User.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Acme
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the organisation!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "owner_id": 1,
    "name": "Acme Ltd.",
    "country": "GB",
    "language_code": "en",
    "timezone": "Europe/London",
    "notes": "",
    "created_at": 1458660548,
    "updated_at": 1474395768,
    "users": [
      {
        "id": 1,
        "firstname": "Joe",
        "lastname": "Bloggs",
        "email": "jbloggs@email.com",
        "confirmed": 1,
        "organisation_id": 1,
        "organisation_access_level": 0,
        "country": "GB",
        "language_code": "en",
        "timezone": "Europe/London",
        "avatar": null,
        "twofa_enabled": 0,
        "twofa_secret": null,
        "twofa_token": null,
        "twitter_id": null,
        "twitter_handle": null,
        "facebook_id": null,
        "created_at": 1445613240,
        "updated_at": 1446314521,
        "formatted_name": "Joe Bloggs"
      }
    ],
    "customfields": [
      {
        "id": 1,
        "field_id": 1,
        "organisation_id": 1,
        "value": "http://www.acmeltd.co.uk",
        "created_at": 1474365413,
        "updated_at": 1474365413
      }
    ]
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The organisation with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/organisation/{id}

Example URI

DELETE /api/user/organisation/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the organisation!",
  "data": null
}

User Group

Groups to put together similar users.

Show all of the records.
GET/api/user/usergroup

Example URI

GET /api/user/usergroup
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Local",
      "description": "Users based within 5 miles.",
      "colour": "#35a600",
      "administrator": 0,
      "created_at": 1445441559,
      "updated_at": 1445441559
    }
  ]
}

Display the specified resource.
GET/api/user/usergroup/{id}

Example URI

GET /api/user/usergroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Local",
    "description": "Users based within 5 miles.",
    "colour": "#35a600",
    "administrator": 0,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}

Store a newly created resource in storage.
POST/api/user/usergroup

Example URI

POST /api/user/usergroup
URI Parameters
HideShow
name
string (required) 

The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

colour
string (optional) Default: #ffffff 

The hex colour of the group.

roles
array (optional) 

An array of role IDs that the group belongs to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new user group!",
  "data": {
    "id": 1,
    "name": "Local",
    "description": "Users based within 5 miles.",
    "colour": "#35a600",
    "administrator": 0,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/user/usergroup/{id}

Example URI

PUT /api/user/usergroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

colour
string (optional) 

The hex colour of the group.

roles
array (optional) 

An array of role IDs that the group belongs to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the user group!",
  "data": {
    "id": 1,
    "name": "Local",
    "description": "Users based within 5 miles.",
    "colour": "#35a600",
    "administrator": 0,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The user group with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/usergroup/{id}

Example URI

DELETE /api/user/usergroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the user group!",
  "data": null
}

Operator Group

Groups used to split operators and give them different permissions.

Show all of the records.
GET/api/user/operatorgroup

Example URI

GET /api/user/operatorgroup
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Sales",
      "description": "Answering customer pre-sale questions.",
      "colour": "#FFFFFF",
      "administrator": 1,
      "created_at": 1445441559,
      "updated_at": 1445441559
    }
  ]
}

Display the specified resource.
GET/api/user/operatorgroup/{id}

Example URI

GET /api/user/operatorgroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "0": "Sales",
    "id": 1,
    "description": "Answering customer pre-sale questions.",
    "colour": "#FFFFFF",
    "administrator": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}

Store a newly created resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
POST/api/user/operatorgroup

Example URI

POST /api/user/operatorgroup
URI Parameters
HideShow
name
string (required) 

The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

colour
string (optional) Default: #ffffff 

The hex colour of the group.

roles
array (optional) 

An array of role IDs that the group belongs to.

brand
array (optional) 

An array of brand IDs that the operator group is assigned to.

department
array (optional) 

An array of department IDs that the operator group is assigned to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Sales
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new operator group!",
  "data": {
    "id": 1,
    "name": "Sales",
    "description": "Answering customer pre-sale questions.",
    "colour": "#FFFFFF",
    "administrator": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/user/operatorgroup/{id}

Example URI

PUT /api/user/operatorgroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the group. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the group. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

colour
string (optional) 

The hex colour of the group.

roles
array (optional) 

An array of role IDs that the group belongs to.

brand
array (optional) 

An array of brand IDs that the operator group is assigned to.

department
array (optional) 

An array of department IDs that the operator group is assigned to.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Sales
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the operator group!",
  "data": {
    "0": "Sales",
    "id": 1,
    "description": "Answering customer pre-sale questions.",
    "colour": "#FFFFFF",
    "administrator": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The operator group with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/operatorgroup/{id}

Example URI

DELETE /api/user/operatorgroup/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the operator group!",
  "data": null
}

Custom Field

Fields that collect and store information on each user account.

Show all of the records.
GET/api/user/customfield

Example URI

GET /api/user/customfield
URI Parameters
HideShow
brand_id
integer (optional) 

Fetch only the custom fields associated with a given brand.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "VAT Number",
      "description": "Please enter your company VAT number if you have one.",
      "type": 8,
      "order": 1,
      "required": 0,
      "public": 1,
      "encrypted": 0,
      "locked": 0,
      "created_at": 1446325459,
      "updated_at": 1446325459,
      "options": []
    }
  ]
}

Display the specified resource.
GET/api/user/customfield/{id}

Example URI

GET /api/user/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "VAT Number",
    "description": "Please enter your company VAT number if you have one.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}

Store a newly created resource in storage.
POST/api/user/customfield

Example URI

POST /api/user/customfield
URI Parameters
HideShow
name
string (required) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (required) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

required
boolean (optional) Default: 0 

Whether the custom field is required to submit the form.

public
boolean (optional) Default: 1 

Whether the custom field should be visible to users.

encrypted
boolean (optional) Default: 0 

Whether to encrypt the custom field value in the database.

locked
boolean (optional) Default: 0 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=VAT+Number&type=8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new custom field!",
  "data": {
    "id": 1,
    "name": "VAT Number",
    "description": "Please enter your company VAT number if you have one.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/user/customfield/{id}

Example URI

PUT /api/user/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (optional) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

required
boolean (optional) 

Whether the custom field is required to submit the form.

public
boolean (optional) 

Whether the custom field should be visible to users.

encrypted
boolean (optional) 

Whether to encrypt the custom field value in the database.

locked
boolean (optional) 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the custom field!",
  "data": {
    "id": 1,
    "name": "VAT Number",
    "description": "Please enter your company VAT number if you have one.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The custom field with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/customfield/{id}

Example URI

DELETE /api/user/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the custom field!",
  "data": null
}

Organisation Custom Field

Fields that collect and store information on each user organisation.

Show all of the records.
GET/api/user/organisationcustomfield

Example URI

GET /api/user/organisationcustomfield
URI Parameters
HideShow
brand_id
integer (optional) 

Fetch only the custom fields associated with a given brand.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Website URL",
      "description": "Please enter your website address",
      "type": 8,
      "order": 1,
      "required": 0,
      "public": 1,
      "encrypted": 0,
      "locked": 0,
      "created_at": 1446325459,
      "updated_at": 1446325459,
      "options": []
    }
  ]
}

Display the specified resource.
GET/api/user/organisationcustomfield/{id}

Example URI

GET /api/user/organisationcustomfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Website URL",
    "description": "Please enter your website address",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}

Store a newly created resource in storage.
POST/api/user/organisationcustomfield

Example URI

POST /api/user/organisationcustomfield
URI Parameters
HideShow
name
string (required) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (required) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

required
boolean (optional) Default: 0 

Whether the custom field is required to submit the form.

public
boolean (optional) Default: 1 

Whether the custom field should be visible on the frontend.

encrypted
boolean (optional) Default: 0 

Whether to encrypt the custom field value in the database.

locked
boolean (optional) Default: 0 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=VAT+Number&type=8
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new custom field!",
  "data": {
    "id": 1,
    "name": "Website URL",
    "description": "Please enter your website address",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/user/organisationcustomfield/{id}

Example URI

PUT /api/user/organisationcustomfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (optional) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

required
boolean (optional) 

Whether the custom field is required to submit the form.

public
boolean (optional) 

Whether the custom field should be visible on the frontend.

encrypted
boolean (optional) 

Whether to encrypt the custom field value in the database.

locked
boolean (optional) 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the custom field!",
  "data": {
    "id": 1,
    "name": "Website URL",
    "description": "Please enter your website address",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "locked": 0,
    "created_at": 1446325459,
    "updated_at": 1446325459,
    "options": []
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The custom field with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/organisationcustomfield/{id}

Example URI

DELETE /api/user/organisationcustomfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the custom field!",
  "data": null
}

Role

A set of permissions that apply to operator groups.

Show all of the records.
GET/api/user/role

Example URI

GET /api/user/role
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Administrator",
      "slug": "administrator",
      "description": "Full permissions",
      "created_at": 1445611886,
      "updated_at": 1445611886,
      "permissions": [
        {
          "id": 1,
          "inherit_id": null,
          "module_id": 1,
          "name": "apitoken",
          "slug": {
            "view": true,
            "create": true,
            "update": true,
            "delete": true
          },
          "description": "apitoken",
          "created_at": 1445611886,
          "updated_at": 1445611886,
          "pivot": {
            "role_id": 1,
            "permission_id": 1
          }
        }
      ]
    }
  ]
}

Display the specified resource.
GET/api/user/role/{id}

Example URI

GET /api/user/role/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Administrator",
    "slug": "administrator",
    "description": "Full permissions",
    "created_at": 1445611886,
    "updated_at": 1445611886,
    "permissions": [
      {
        "id": 1,
        "inherit_id": null,
        "module_id": 1,
        "name": "apitoken",
        "slug": {
          "view": true,
          "create": true,
          "update": true,
          "delete": true
        },
        "description": "apitoken",
        "created_at": 1445611886,
        "updated_at": 1445611886,
        "pivot": {
          "role_id": 1,
          "permission_id": 1
        }
      }
    ]
  }
}

Store a newly created resource in storage.
POST/api/user/role

Example URI

POST /api/user/role
URI Parameters
HideShow
name
string (required) 

The name of the operator role. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the operator role. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

group
array (optional) 

An array of operator group IDs that has the role.

permission
array (optional) 

An array, keyed by permission IDs, with value 1 when the role has that permission.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Administrator&permission[1]=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new role!",
  "data": {
    "id": 1,
    "name": "Administrator",
    "slug": "administrator",
    "description": "Full permissions",
    "created_at": 1445611886,
    "updated_at": 1445611886,
    "permissions": [
      {
        "id": 1,
        "inherit_id": null,
        "module_id": 1,
        "name": "apitoken",
        "slug": {
          "view": true,
          "create": true,
          "update": true,
          "delete": true
        },
        "description": "apitoken",
        "created_at": 1445611886,
        "updated_at": 1445611886,
        "pivot": {
          "role_id": 1,
          "permission_id": 1
        }
      }
    ]
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/user/role/{id}

Example URI

PUT /api/user/role/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the operator role. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the operator role. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

group
array (optional) 

An array of operator group IDs that has the role.

permission
array (optional) 

An array, keyed by permission IDs, with value 1 when the role has that permission.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Local
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the role!",
  "data": {
    "id": 1,
    "name": "Administrator",
    "slug": "administrator",
    "description": "Full permissions",
    "created_at": 1445611886,
    "updated_at": 1445611886,
    "permissions": [
      {
        "id": 1,
        "inherit_id": null,
        "module_id": 1,
        "name": "apitoken",
        "slug": {
          "view": true,
          "create": true,
          "update": true,
          "delete": true
        },
        "description": "apitoken",
        "created_at": 1445611886,
        "updated_at": 1445611886,
        "pivot": {
          "role_id": 1,
          "permission_id": 1
        }
      }
    ]
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The role with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/user/role/{id}

Example URI

DELETE /api/user/role/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the role!",
  "data": null
}

Permission

Permissions for operators.

Show all of the records.
GET/api/user/permission

Example URI

GET /api/user/permission
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "inherit_id": null,
      "module_id": 1,
      "name": "apitoken",
      "slug": {
        "view": true,
        "create": true,
        "update": true,
        "delete": true
      },
      "description": "apitoken",
      "created_at": 1445611886,
      "updated_at": 1445611886
    }
  ]
}

Display the specified resource.
GET/api/user/permission/{id}

Example URI

GET /api/user/permission/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "inherit_id": null,
    "module_id": 1,
    "name": "apitoken",
    "slug": {
      "view": true,
      "create": true,
      "update": true,
      "delete": true
    },
    "description": "apitoken",
    "created_at": 1445611886,
    "updated_at": 1445611886
  }
}

Settings

User system settings.

General Settings
GET/api/user/settings

Example URI

GET /api/user/settings
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "ldap_enabled": "0",
    "registration_captcha": "1",
    "registration_enabled": "1",
    "user_name_format": "0"
  }
}

Ticket

Ticket

Tickets are individual support requests from users or internal staff.

Show all of the records.
GET/api/ticket/ticket

Example URI

GET /api/ticket/ticket
URI Parameters
HideShow
filter
integer (optional) 

Filter by a ticket filter, will ignore all of the below filtering options if set.

filter_operator
integer (optional) 

If filtering by a ticket filter, set which operator to run the filter as.

number
string (optional) 

Search by ticket number.

department
mixed (optional) 

Filter by ticket department, accepts a single ID or a comma delimited string e.g. 1,2,3. Parent departments include children department tickets.

brand
mixed (optional) 

Filter by ticket brand, accepts a single ID or a comma delimited string e.g. 1,2,3.

channel
mixed (optional) 

Filter by ticket channel, accepts a single ID or a comma delimited string e.g. 1,2,3.

status
mixed (optional) 

Filter by ticket status, accepts a single ID or a comma delimited string e.g. 1,2,3.

priority
mixed (optional) 

Filter by ticket priority, accepts a single ID or a comma delimited string e.g. 1,2,3.

tag
mixed (optional) 

Fetch tickets with tag(s), accepts a single ID or a comma delimited string e.g. 1,2,3.

user
mixed (optional) 

Filter by submitting user, accepts a single ID or a comma delimited string e.g. 1,2,3.

user_email
string (optional) 

Filter by the user’s email address.

organisation
mixed (optional) 

Filter by organisation, accepts a single ID or a comma delimited string e.g. 1,2,3.

assigned
mixed (optional) 

Filter by assigned operator, accepts a single ID or a comma delimited string e.g. 1,2,3. Use ‘-1’ to find unassigned tickets.

internal
boolean (optional) 

Fetch only internal tickets (1) or non-internal tickets (0).

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "status": "success",
    "message": null,
    "count": 1,
    "data": [
        {
            "id": 1,
            "number": "3189840",
            "department_id": 2,
            "department_email_id": 1,
            "brand_id": 1,
            "channel_id": 1,
            "user_id": 2,
            "status_id": 1,
            "priority_id": 1,
            "sla_plan_id": null,
            "subject": "Test",
            "due_time": null,
            "resolved_time": null,
            "cc": [],
            "locked": 0,
            "merged": 0,
            "internal": 0,
            "created_at": 1445962331,
            "updated_at": 1445962332,
            "department": {
                "id": 2,
                "name": "Test",
                "description": "Test",
                "order": 2,
                "parent": 1,
                "public": 0,
                "ticket_number_format": null,
                "default_assignedto": null,
                "notify_email_ticket": 1,
                "email_templates": [],
                "created_at": 1445960900,
                "updated_at": 1445960900
            },
            "channel": {
                "id": 1,
                "name": "Web",
                "enabled": 1,
                "class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
                "created_at": 1445611904,
                "updated_at": 1445611904
            },
            "user": {
                "id": 2,
                "firstname": "Joe",
                "lastname": "Bloggs",
                "email": "jshah4517@gmail.com",
                "confirmed": 1,
                "organisation_id": 3,
                "organisation_access_level": 0,
                "country": "US",
                "language_code": "en",
                "timezone": "Europe/London",
                "avatar": null,
                "twofa_enabled": 0,
                "twofa_secret": null,
                "twofa_token": null,
                "twitter_id": null,
                "twitter_handle": null,
                "facebook_id": null,
                "created_at": 1445613240,
                "updated_at": 1446314521,
                "formatted_name": "Joe Bloggs"
            },
            "status": {
                "id": 1,
                "name": "Open",
                "colour": "#35a600",
                "auto_close": 1,
                "order": 1,
                "created_at": 1445611902,
                "updated_at": 1445611902
            },
            "priority": {
                "id": 1,
                "name": "Low",
                "colour": "#3498db",
                "order": 1,
                "created_at": 1445611902,
                "updated_at": 1445611902
            },
            "slaplan": null
        }
    ]
}

Display the specified resource.
GET/api/ticket/ticket/{id}

Example URI

GET /api/ticket/ticket/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "status": "success",
    "message": null,
    "data": {
        "id": 1,
        "number": "3189840",
        "department_id": 2,
        "department_email_id": 1,
        "brand_id": 1,
        "channel_id": 1,
        "user_id": 2,
        "status_id": 1,
        "priority_id": 1,
        "sla_plan_id": null,
        "subject": "Test",
        "due_time": null,
        "resolved_time": null,
        "cc": [],
        "locked": 0,
        "merged": 0,
        "internal": 0,
        "created_at": 1445962331,
        "updated_at": 1445962332,
        "department": {
            "id": 2,
            "name": "Test",
            "description": "Test",
            "order": 2,
            "parent": 1,
            "public": 0,
            "ticket_number_format": null,
            "default_assignedto": null,
            "notify_email_ticket": 1,
            "email_templates": [],
            "created_at": 1445960900,
            "updated_at": 1445960900
        },
        "channel": {
            "id": 1,
            "name": "Web",
            "enabled": 1,
            "class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
            "created_at": 1445611904,
            "updated_at": 1445611904
        },
        "user": {
            "id": 2,
            "firstname": "Joe",
            "lastname": "Bloggs",
            "email": "jbloggs@email.com",
            "confirmed": 1,
            "organisation_id": 3,
            "organisation_access_level": 0,
            "country": "US",
            "language_code": "en",
            "timezone": "Europe/London",
            "avatar": null,
            "twofa_enabled": 0,
            "twofa_secret": null,
            "twofa_token": null,
            "twitter_id": null,
            "twitter_handle": null,
            "facebook_id": null,
            "created_at": 1445613240,
            "updated_at": 1446314521,
            "formatted_name": "Joe Bloggs"
        },
        "status": {
            "id": 1,
            "name": "Open",
            "colour": "#35a600",
            "auto_close": 1,
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "priority": {
            "id": 1,
            "name": "Low",
            "colour": "#3498db",
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "slaplan": null
    }
}

Store a newly created resource in storage.
POST/api/ticket/ticket

Example URI

POST /api/ticket/ticket
URI Parameters
HideShow
user
integer (optional) 

The user opening the ticket, an operator ID is required if opening an internal ticket.

user_firstname
string (optional) 

If a new user, set the user’s first name.

user_lastname
string (optional) 

If a new user, set the user’s last name.

user_email
string (optional) 

If a new user, set the user’s email, required if no user ID set. Can be entered instead of the user parameter to find a user by their email address.

user_organisation
string (optional) 

If a new user, set the user’s organisation, will create a new organisation.

user_ip_address
string (optional) 

The user’s IP address.

department
integer (required) 

The department the ticket is being opened in. It must be assigned to the brand that the ticket is being opened in.

brand
integer (optional) 

The brand the ticket is being opened in, defaults to default brand if not entered.

status
integer (required) 

The status of the new ticket.

priority
integer (required) 

The priority of the new ticket.

internal
boolean (optional) Default: 0 

If the ticket is internal (for operators only). If true, requires the user parameter to be set to an operator ID.

subject
string (required) 

The ticket subject.

text
string (required) 

The initial ticket message.

tag
array (optional) 

An array of tag IDs for the new ticket.

assignedto
array (optional) 

An array of operator IDs that are assigned to the new ticket.

customfield
array (optional) 

An array of custom fields values, keyed by their ID.

cc
array (optional) 

An array of email addresses to CC on the ticket.

send_user_email
boolean (optional) Default: 1 

Whether to send an email to the user(s) about the new ticket.

send_operators_email
boolean (optional) Default: 1 

Whether to send an email to operators about the new ticket.

attachment[n][filename]
string (optional) 

Attachment filename.

attachment[n][contents]
string (optional) 

Base64-encoded file contents.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
user=2&department=2&status=1&priority=1&subject=Test&text=Testing+this
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "status": "success",
    "message": "Successfully created new ticket!",
    "data": {
        "id": 1,
        "number": "3189840",
        "department_id": 2,
        "department_email_id": 1,
        "brand_id": 1,
        "channel_id": 1,
        "user_id": 2,
        "status_id": 1,
        "priority_id": 1,
        "sla_plan_id": null,
        "subject": "Test",
        "due_time": null,
        "resolved_time": null,
        "cc": [],
        "locked": 0,
        "merged": 0,
        "internal": 0,
        "created_at": 1445962331,
        "updated_at": 1445962332,
        "department": {
            "id": 2,
            "name": "Test",
            "description": "Test",
            "order": 2,
            "parent": 1,
            "public": 0,
            "ticket_number_format": null,
            "default_assignedto": null,
            "notify_email_ticket": 1,
            "email_templates": [],
            "created_at": 1445960900,
            "updated_at": 1445960900
        },
        "channel": {
            "id": 1,
            "name": "Web",
            "enabled": 1,
            "class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
            "created_at": 1445611904,
            "updated_at": 1445611904
        },
        "user": {
            "id": 2,
            "firstname": "Joe",
            "lastname": "Bloggs",
            "email": "jbloggs@email.com",
            "confirmed": 1,
            "organisation_id": 3,
            "organisation_access_level": 0,
            "country": "US",
            "language_code": "en",
            "timezone": "Europe/London",
            "avatar": null,
            "twofa_enabled": 0,
            "twofa_secret": null,
            "twofa_token": null,
            "twitter_id": null,
            "twitter_handle": null,
            "facebook_id": null,
            "created_at": 1445613240,
            "updated_at": 1446314521,
            "formatted_name": "Joe Bloggs"
        },
        "status": {
            "id": 1,
            "name": "Open",
            "colour": "#35a600",
            "auto_close": 1,
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "priority": {
            "id": 1,
            "name": "Low",
            "colour": "#3498db",
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "slaplan": null
    }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The department field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/ticket/ticket/{id}

Example URI

PUT /api/ticket/ticket/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

user
integer (optional) 

Update the user on the ticket.

department
integer (optional) 

Update the department on the ticket. It must be in the brand that the ticket has been opened in.

status
integer (optional) 

Update the status on the ticket.

priority
integer (optional) 

Update the priority on the ticket.

subject
integer (optional) 

Update the subject on the ticket.

tag
array (optional) 

An array of tag IDs for the ticket (overwrites existing tags).

assignedto
array (optional) 

An array of operator IDs that are assigned to the ticket.

sla_plan
integer (optional) 

Update the SLA plan on the ticket (will also update due time).

due_time
integer (optional) 

Manually set the due time on the ticket, set as a UNIX timestamp.

customfield
array (optional) 

An array of custom fields values, keyed by their ID (overwrites existing custom fields).

cc
array (optional) 

An array of email addresses to CC on the ticket (overwrites existing CC emails).

locked
boolean (optional) 

If the ticket is locked and the user cannot add any further replies.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
department=2
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
    "status": "success",
    "message": "Successfully updated the ticket!",
    "data": {
        "id": 1,
        "number": "3189840",
        "department_id": 2,
        "department_email_id": 1,
        "brand_id": 1,
        "channel_id": 1,
        "user_id": 2,
        "status_id": 1,
        "priority_id": 1,
        "sla_plan_id": null,
        "subject": "Test",
        "due_time": null,
        "resolved_time": null,
        "cc": [],
        "locked": 0,
        "merged": 0,
        "internal": 0,
        "created_at": 1445962331,
        "updated_at": 1445962332,
        "department": {
            "id": 2,
            "name": "Test",
            "description": "Test",
            "order": 2,
            "parent": 1,
            "public": 0,
            "ticket_number_format": null,
            "default_assignedto": null,
            "notify_email_ticket": 1,
            "email_templates": [],
            "created_at": 1445960900,
            "updated_at": 1445960900
        },
        "channel": {
            "id": 1,
            "name": "Web",
            "enabled": 1,
            "class": "App\Modules\Ticket\Channels\Web\Controllers\Web",
            "created_at": 1445611904,
            "updated_at": 1445611904
        },
        "user": {
            "id": 2,
            "firstname": "Joe",
            "lastname": "Bloggs",
            "email": "jbloggs@email.com",
            "confirmed": 1,
            "organisation_id": 3,
            "organisation_access_level": 0,
            "country": "US",
            "language_code": "en",
            "timezone": "Europe/London",
            "avatar": null,
            "twofa_enabled": 0,
            "twofa_secret": null,
            "twofa_token": null,
            "twitter_id": null,
            "twitter_handle": null,
            "facebook_id": null,
            "created_at": 1445613240,
            "updated_at": 1446314521,
            "formatted_name": "Joe Bloggs"
        },
        "status": {
            "id": 1,
            "name": "Open",
            "colour": "#35a600",
            "auto_close": 1,
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "priority": {
            "id": 1,
            "name": "Low",
            "colour": "#3498db",
            "order": 1,
            "created_at": 1445611902,
            "updated_at": 1445611902
        },
        "slaplan": null
    }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "There was an error updating the ticket.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/ticket/{id}

Example URI

DELETE /api/ticket/ticket/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the ticket!",
  "data": null
}

Message

Class TicketMessageController

Show all of the records.
GET/api/ticket/message

Example URI

GET /api/ticket/message
URI Parameters
HideShow
ticket_id
integer (optional) 

Fetch only messages belonging to a certain ticket.

include_draft
boolean (optional) Default: 0 

Whether to include drafts.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "ticket_id": 1,
      "channel_id": 1,
      "user_id": 1,
      "user_ip_address": null,
      "by": 0,
      "type": 0,
      "text": "est",
      "is_draft": 0,
      "social_id": null,
      "created_at": 1445525220,
      "updated_at": 1445525220,
      "user": {
        "id": 2,
        "firstname": "Joe",
        "lastname": "Bloggs",
        "email": "jbloggs@email.com",
        "confirmed": 1,
        "organisation_id": 3,
        "organisation_access_level": 0,
        "country": "US",
        "language_code": "en",
        "timezone": "Europe/London",
        "avatar": null,
        "twofa_enabled": 0,
        "twofa_secret": null,
        "twofa_token": null,
        "twitter_id": null,
        "twitter_handle": null,
        "facebook_id": null,
        "created_at": 1445613240,
        "updated_at": 1446314521,
        "formatted_name": "Joe Bloggs"
      }
    }
  ]
}

Display the specified resource.
GET/api/ticket/message/{id}

Example URI

GET /api/ticket/message/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "ticket_id": 1,
    "channel_id": 1,
    "user_id": 1,
    "user_ip_address": null,
    "by": 0,
    "type": 0,
    "text": "est",
    "is_draft": 0,
    "social_id": null,
    "created_at": 1445525220,
    "updated_at": 1445525220,
    "user": {
      "id": 2,
      "firstname": "Joe",
      "lastname": "Bloggs",
      "email": "jbloggs@email.com",
      "confirmed": 1,
      "organisation_id": 3,
      "organisation_access_level": 0,
      "country": "US",
      "language_code": "en",
      "timezone": "Europe/London",
      "avatar": null,
      "twofa_enabled": 0,
      "twofa_secret": null,
      "twofa_token": null,
      "twitter_id": null,
      "twitter_handle": null,
      "facebook_id": null,
      "created_at": 1445613240,
      "updated_at": 1446314521,
      "formatted_name": "Joe Bloggs"
    }
  }
}

Store a newly created resource in storage.
POST/api/ticket/message

Example URI

POST /api/ticket/message
URI Parameters
HideShow
ticket_id
string (required) 

The ticket we’re posting to.

user_id
string (required) 

The user we’re posting on behalf of.

user_ip_address
string (optional) 

The user’s IP address.

message_type
integer (optional) Default: 0 

Whether we’re adding a normal message or an operator note (0 or 1).

text
string (required) 

The message.

cc
array (optional) 

An array of email addresses to CC on the ticket

is_draft
integer (optional) Default: 0 

Whether the message is a draft.

send_user_email
integer (optional) Default: 1 

If an operator reply, whether to send an email to the user(s).

send_operators_email
integer (optional) Default: 1 

If a user reply, whether to send a notification to the relevant operators. If an operator reply, whether to also send an email to the operators containing the reply (default 0 in this case).

attachment[n][filename]
string (optional) 

Attachment filename.

attachment[n][contents]
string (optional) 

Base64-encoded file contents.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
ticket_id=1&user_id=1&message
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new message!",
  "data": {
    "id": 1,
    "ticket_id": 1,
    "channel_id": 1,
    "user_id": 1,
    "user_ip_address": null,
    "by": 0,
    "type": 0,
    "text": "est",
    "is_draft": 0,
    "social_id": null,
    "created_at": 1445525220,
    "updated_at": 1445525220,
    "user": {
      "id": 2,
      "firstname": "Joe",
      "lastname": "Bloggs",
      "email": "jbloggs@email.com",
      "confirmed": 1,
      "organisation_id": 3,
      "organisation_access_level": 0,
      "country": "US",
      "language_code": "en",
      "timezone": "Europe/London",
      "avatar": null,
      "twofa_enabled": 0,
      "twofa_secret": null,
      "twofa_token": null,
      "twitter_id": null,
      "twitter_handle": null,
      "facebook_id": null,
      "created_at": 1445613240,
      "updated_at": 1446314521,
      "formatted_name": "Joe Bloggs"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/ticket/message/{id}

Example URI

PUT /api/ticket/message/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

text
string (required) 

The replacement text for the message.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=I've+edited+this+message.
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the message!",
  "data": {
    "id": 1,
    "ticket_id": 1,
    "channel_id": 1,
    "user_id": 1,
    "user_ip_address": null,
    "by": 0,
    "type": 0,
    "text": "est",
    "is_draft": 0,
    "social_id": null,
    "created_at": 1445525220,
    "updated_at": 1445525220,
    "user": {
      "id": 2,
      "firstname": "Joe",
      "lastname": "Bloggs",
      "email": "jbloggs@email.com",
      "confirmed": 1,
      "organisation_id": 3,
      "organisation_access_level": 0,
      "country": "US",
      "language_code": "en",
      "timezone": "Europe/London",
      "avatar": null,
      "twofa_enabled": 0,
      "twofa_secret": null,
      "twofa_token": null,
      "twitter_id": null,
      "twitter_handle": null,
      "facebook_id": null,
      "created_at": 1445613240,
      "updated_at": 1446314521,
      "formatted_name": "Joe Bloggs"
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "There was an error updating the message.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/message/{id}

Example URI

DELETE /api/ticket/message/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the message!",
  "data": null
}

Attachment

Ticket attachments, each assigned to a specific ticket message.

Show all of the records.
GET/api/ticket/attachment

Example URI

GET /api/ticket/attachment
URI Parameters
HideShow
ticket_id
integer (optional) 

Only fetch attachments associated with the ticket ID.

message_id
integer (optional) 

Only fetch attachments associated with the ticket message ID.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
      "ticket_id": 1,
      "message_id": 12,
      "original_name": "wall3[1].jpg",
      "created_at": 1446224250,
      "updated_at": 1446224250,
      "upload": {
        "id": 8,
        "hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
        "filename": "wall3[1].jpg",
        "folder": "tickets",
        "mime": "image/jpeg",
        "size": "367.4 KB",
        "created_at": 1446224225,
        "updated_at": 1446224225
      }
    }
  ]
}

Display the specified resource.
GET/api/ticket/attachment/{id}

Example URI

GET /api/ticket/attachment/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
    "ticket_id": 1,
    "message_id": 12,
    "original_name": "wall3[1].jpg",
    "created_at": 1446224250,
    "updated_at": 1446224250,
    "upload": {
      "id": 8,
      "hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
      "filename": "wall3[1].jpg",
      "folder": "tickets",
      "mime": "image/jpeg",
      "size": "367.4 KB",
      "created_at": 1446224225,
      "updated_at": 1446224225
    }
  }
}

Download the specified resource. Returns file data.
GET/api/ticket/attachment/{id}/download

Example URI

GET /api/ticket/attachment/id/download
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json

Store a newly created resource in storage.
POST/api/ticket/attachment

Example URI

POST /api/ticket/attachment
URI Parameters
HideShow
message_id
integer (required) 

The ticket message to associate the attachment with.

filename
string (required) 

The name of the file.

contents
string (required) 

The base64-encoded file contents being uploaded.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
message_id=1&filename=hello.jpg&contents=MQ==
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new attachment!",
  "data": {
    "id": 1,
    "upload_hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
    "ticket_id": 1,
    "message_id": 12,
    "original_name": "wall3[1].jpg",
    "created_at": 1446224250,
    "updated_at": 1446224250,
    "upload": {
      "id": 8,
      "hash": "b112b4d090c04d771c6d0d31dd5f77499b0b682c",
      "filename": "wall3[1].jpg",
      "folder": "tickets",
      "mime": "image/jpeg",
      "size": "367.4 KB",
      "created_at": 1446224225,
      "updated_at": 1446224225
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The filename field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/attachment/{id}

Example URI

DELETE /api/ticket/attachment/id
URI Parameters
HideShow
id
string (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the attachment!",
  "data": null
}

Status

Used to identify the current state of a ticket.

Show all of the records.
GET/api/ticket/status

Example URI

GET /api/ticket/status
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Open",
      "colour": "#35a600",
      "auto_close": 1,
      "order": 1,
      "created_at": 1445441559,
      "updated_at": 1445441559
    }
  ]
}

Display the specified resource.
GET/api/ticket/status/{id}

Example URI

GET /api/ticket/status/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Open",
    "colour": "#35a600",
    "auto_close": 1,
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}

Store a newly created resource in storage.
POST/api/ticket/status

Example URI

POST /api/ticket/status
URI Parameters
HideShow
name
string (required) 

The name of the status. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

colour
string (optional) Default: #ffffff 

The colour of the status.

auto_close
integer (required) 

Whether tickets should be automatically closed.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Open&auto_close=0
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new status!",
  "data": {
    "id": 1,
    "name": "Open",
    "colour": "#35a600",
    "auto_close": 1,
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/ticket/status/{id}

Example URI

PUT /api/ticket/status/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (required) 

The name of the status. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.

colour
string (optional) 

The colour of the status.

auto_close
integer (optional) 

Whether tickets should be automatically closed.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Open&colour=#999999
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the status!",
  "data": {
    "id": 1,
    "name": "Open",
    "colour": "#35a600",
    "auto_close": 1,
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The status with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/status/{id}

Example URI

DELETE /api/ticket/status/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the status!",
  "data": null
}

Priority

The urgency levels available for tickets.

Show all of the records.
GET/api/ticket/priority

Example URI

GET /api/ticket/priority
URI Parameters
HideShow
department_id
integer (optional) 

Fetch only the priorities associated with a given department

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Low",
      "colour": "#3498db",
      "order": 1,
      "created_at": 1445441559,
      "updated_at": 1445441559
    }
  ]
}

Display the specified resource.
GET/api/ticket/priority/{id}

Example URI

GET /api/ticket/priority/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Low",
    "colour": "#3498db",
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}

Store a newly created resource in storage.
POST/api/ticket/priority

Example URI

POST /api/ticket/priority
URI Parameters
HideShow
name
string (required) 

The name of the priority. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

colour
string (optional) Default: #ffffff 

The colour of the priority.

depts
array (optional) 

List of department IDs.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#666
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new priority!",
  "data": {
    "id": 1,
    "name": "Low",
    "colour": "#3498db",
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/ticket/priority/{id}

Example URI

PUT /api/ticket/priority/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (required) 

The name of the priority. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.

colour
string (optional) 

The colour of the priority.

depts
array (optional) 

List of department IDs.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#999999
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the priority!",
  "data": {
    "id": 1,
    "name": "Low",
    "colour": "#3498db",
    "order": 1,
    "created_at": 1445441559,
    "updated_at": 1445441559
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The priority with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/priority/{id}

Example URI

DELETE /api/ticket/priority/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the priority!",
  "data": null
}

Tag

Tags can be given to tickets, as another way to categorise tickets.

Show all of the records.
GET/api/ticket/tag

Example URI

GET /api/ticket/tag
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 10,
      "name": "Reseller",
      "colour": "#dddddd",
      "created_at": 1418237799,
      "updated_at": 1418237799
    }
  ]
}

Display the specified resource.
GET/api/ticket/tag/{id}

Example URI

GET /api/ticket/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 10,
    "name": "Reseller",
    "colour": "#dddddd",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}

Store a newly created resource in storage.
POST/api/ticket/tag

Example URI

POST /api/ticket/tag
URI Parameters
HideShow
name
string (required) 

The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

colour
string (optional) Default: #dddddd 

The colour of the tag.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Reseller"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new tag!",
  "data": {
    "id": 10,
    "name": "Reseller",
    "colour": "#dddddd",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/ticket/tag/{id}

Example URI

PUT /api/ticket/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (required) 

The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.

colour
string (optional) 

The colour of the tag.

Request
HideShow
Headers
Content-Type: application/json
Body
{
  "name": "Reseller"
}
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the tag!",
  "data": {
    "id": 10,
    "name": "Reseller",
    "colour": "#dddddd",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The tag with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/tag/{id}

Example URI

DELETE /api/ticket/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the tag!",
  "data": null
}

Custom Field

Fields that collect and store information on each ticket.

Show all of the records.
GET/api/ticket/customfield

Example URI

GET /api/ticket/customfield
URI Parameters
HideShow
brand_id
integer (optional) 

Fetch only the custom fields associated with a given brand.

department_id
integer (optional) 

Fetch only the custom fields associated with a given department.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "count": 1,
  "message": null,
  "data": [
    {
      "id": 1,
      "name": "IP Address",
      "description": "Please enter your server's IP address.",
      "type": 8,
      "order": 1,
      "required": 0,
      "public": 1,
      "encrypted": 0,
      "purge": 0,
      "locked": 0,
      "created_at": 1446228389,
      "updated_at": 1446228389
    }
  ]
}

Display the specified resource.
GET/api/ticket/customfield/{id}

Example URI

GET /api/ticket/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "IP Address",
    "description": "Please enter your server's IP address.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "purge": 0,
    "locked": 0,
    "created_at": 1446228389,
    "updated_at": 1446228389
  }
}

Store a newly created resource in storage.
POST/api/ticket/customfield

Example URI

POST /api/ticket/customfield
URI Parameters
HideShow
name
string (required) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (required) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

depts
array (optional) 

List of department IDs.

required
boolean (optional) Default: 0 

Whether the custom field is required to submit the form.

public
boolean (optional) Default: 1 

Whether the custom field should be visible to users.

encrypted
boolean (optional) Default: 0 

Whether to encrypt the custom field value in the database.

purge
boolean (optional) Default: 0 

Whether to purge the custom field.

locked
boolean (optional) Default: 0 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=IP Address&type=1&required=1&public=1&encrypted=0&purge=0&locked=0
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new custom field!",
  "data": {
    "id": 1,
    "name": "IP Address",
    "description": "Please enter your server's IP address.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "purge": 0,
    "locked": 0,
    "created_at": 1446228389,
    "updated_at": 1446228389
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/ticket/customfield/{id}

Example URI

PUT /api/ticket/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the custom field. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the custom field that is displayed to users. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

type
integer (optional) 

The custom field type. 0 - Boolean, 1 - Checkbox, 2 - Checklist, 3 - Date, 4 - Multiple Options, 5 - Options, 6 - Password, 7 - Radio Buttons, 8 - Text, 9 - Textarea.

brand
array (optional) 

An array of brand IDs that the field is available in.

depts
array (optional) 

An array of department IDs that the field is available in.

required
boolean (optional) Default: 0 

Whether the custom field is required to submit the form.

public
boolean (optional) Default: 1 

Whether the custom field should be visible to users.

encrypted
boolean (optional) Default: 0 

Whether to encrypt the custom field value in the database.

purge
boolean (optional) Default: 0 

Whether to purge the custom field.

locked
boolean (optional) Default: 0 

Whether to prevent edits to the custom field.

options
array (optional) 

An array of options, only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations for options, add option[id]:locale, such as ‘option[0]:en’, to the request to store a name for that option for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
required=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the custom field!",
  "data": {
    "id": 1,
    "name": "IP Address",
    "description": "Please enter your server's IP address.",
    "type": 8,
    "order": 1,
    "required": 0,
    "public": 1,
    "encrypted": 0,
    "purge": 0,
    "locked": 0,
    "created_at": 1446228389,
    "updated_at": 1446228389
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The custom field with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/customfield/{id}

Example URI

DELETE /api/ticket/customfield/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the custom field!",
  "data": null
}

Canned Response

Commonly used replies by operators.

Show all of the records.
GET/api/ticket/cannedresponse

Example URI

GET /api/ticket/cannedresponse
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "test",
      "text": "test",
      "category_id": 1,
      "user_id": null,
      "all_groups": 1,
      "department_id": null,
      "priority_id": null,
      "status_id": null,
      "tags": "[]",
      "created_at": 1446134483,
      "updated_at": 1446134483
    }
  ]
}

Display the specified resource.
GET/api/ticket/cannedresponse/{id}

Example URI

GET /api/ticket/cannedresponse/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Hello",
    "text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
    "user_id": null,
    "public": 1,
    "all_groups": 1,
    "created_at": 1446134483,
    "updated_at": 1446134483,
    "tags": [],
    "groups": []
  }
}

Store a newly created resource in storage.
POST/api/ticket/cannedresponse

Example URI

POST /api/ticket/cannedresponse
URI Parameters
HideShow
name
string (required) 

The name of the canned response. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

text
string (required) 

The canned response. To add translations for the response text, add text:locale, such as ‘text:en’, to the request to store response text for that given translation.

tag
array (optional) 

An array of tag names for the canned response.

groups
array (optional) 

List of operator groups who can see the canned response, an empty array means available to all operators.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Hello&text=Hi,<br/>Thank you for your message, we'll get back to you shortly.&category_id=1&public=0
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new canned response!",
  "data": {
    "id": 1,
    "name": "Hello",
    "text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
    "user_id": null,
    "public": 1,
    "all_groups": 1,
    "created_at": 1446134483,
    "updated_at": 1446134483,
    "tags": [],
    "groups": []
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/ticket/cannedresponse/{id}

Example URI

PUT /api/ticket/cannedresponse/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the canned response. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

text
string (optional) 

The canned response. To add translations for the response text, add text:locale, such as ‘text:en’, to the request to store response text for that given translation.

tag
array (optional) 

An array of tag names for the canned response. Will replace the existing tags on the canned response.

groups
array (optional) 

List of operator groups who can see the canned response, an empty array means available to all operators.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Low&colour=#999999
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the canned response!",
  "data": {
    "id": 1,
    "name": "Hello",
    "text": "Hi,<br/>Thank you for your message, we'll get back to you shortly",
    "user_id": null,
    "public": 1,
    "all_groups": 1,
    "created_at": 1446134483,
    "updated_at": 1446134483,
    "tags": [],
    "groups": []
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The canned response with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/ticket/cannedresponse/{id}

Example URI

DELETE /api/ticket/cannedresponse/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the canned response!",
  "data": null
}

Department

Tickets are divided into different departments.

Show all of the records.
GET/api/ticket/department

Example URI

GET /api/ticket/department
URI Parameters
HideShow
brand_id
integer (optional) 

Fetch departments that are assigned to the given brand.

parent_id
integer (optional) 

Fetch subdeparments of a given parent, set to 0 to fetch all parent departments only.

public
boolean (optional) 

Fetch public or hidden departments only.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Support",
      "description": "This is an automatically generated department, please edit me.",
      "order": 1,
      "parent_id": null,
      "public": 1,
      "ticket_number_format": null,
      "default_assignedto": null,
      "notify_frontend_ticket": 1,
      "notify_email_ticket": 1,
      "notify_operators": 0,
      "disable_user_email_replies": 0,
      "email_templates": {
        "user_ticket_opened": 3,
        "user_ticket_reply": 2,
        "user_ticket_locked": 8,
        "user_ticket_waitingresponse": 11,
        "user_ticket_autoclose": 13,
        "user_ticket_operatorclose": 20,
        "user_email_attachmentrejected": 21,
        "user_ticket_disablereplies": -1,
        "operator_assigned": 1,
        "operator_ticket_opened": 4,
        "operator_user_ticket_reply": 5,
        "operator_internal_opened": 18,
        "operator_department_changed": 19,
        "operator_operator_ticket_reply": 23,
        "operator_ticket_note": 24
      },
      "created_at": 1445441560,
      "updated_at": 1445441560,
      "emails": [
        {
          "id": 1,
          "department_id": 1,
          "address": "support@my.company",
          "type": 0,
          "protocol": null,
          "server": null,
          "username": null,
          "password": null,
          "port": null,
          "encryption": null,
          "consume_all": null,
          "delete_downloaded": null,
          "created_at": 0,
          "updated_at": 0
        }
      ],
      "groups": [
        {
          "id": 1,
          "name": "System Administrators",
          "description": "Default group for administrators, always has all permissions.",
          "colour": "#777777",
          "administrator": 1,
          "created_at": 1458390899,
          "updated_at": 1458390899,
          "pivot": {
            "department_id": 4,
            "group_id": 1
          }
        }
      ],
      "operators": [
        {
          "id": 1,
          "firstname": "Joe",
          "lastname": "Blogs",
          "email": "joe.blogs@mycompany.com",
          "confirmed": 1,
          "organisation_id": null,
          "organisation_access_level": null,
          "country": null,
          "language_code": null,
          "timezone": null,
          "avatar": "...",
          "created_at": 1445441612,
          "updated_at": 1445954346,
          "formatted_name": "Joe Blogs",
          "pivot": {
            "department_id": 1,
            "user_id": 1
          }
        }
      ]
    }
  ]
}

Display the specified resource.
GET/api/ticket/department/{id}

Example URI

GET /api/ticket/department/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Support",
    "description": "This is an automatically generated department, please edit me.",
    "order": 1,
    "parent_id": null,
    "public": 1,
    "ticket_number_format": null,
    "default_assignedto": null,
    "notify_frontend_ticket": 1,
    "notify_email_ticket": 1,
    "notify_operators": 0,
    "disable_user_email_replies": 0,
    "email_templates": {
      "user_ticket_opened": 3,
      "user_ticket_reply": 2,
      "user_ticket_locked": 8,
      "user_ticket_waitingresponse": 11,
      "user_ticket_autoclose": 13,
      "user_ticket_operatorclose": 20,
      "user_email_attachmentrejected": 21,
      "user_ticket_disablereplies": -1,
      "operator_assigned": 1,
      "operator_ticket_opened": 4,
      "operator_user_ticket_reply": 5,
      "operator_internal_opened": 18,
      "operator_department_changed": 19,
      "operator_operator_ticket_reply": 23,
      "operator_ticket_note": 24
    },
    "created_at": 1445441560,
    "updated_at": 1445441560,
    "emails": [
      {
        "id": 1,
        "department_id": 1,
        "address": "support@my.company",
        "type": 0,
        "protocol": null,
        "server": null,
        "username": null,
        "password": null,
        "port": null,
        "encryption": null,
        "consume_all": null,
        "delete_downloaded": null,
        "created_at": 0,
        "updated_at": 0
      }
    ],
    "groups": [
      {
        "id": 1,
        "name": "System Administrators",
        "description": "Default group for administrators, always has all permissions.",
        "colour": "#777777",
        "administrator": 1,
        "created_at": 1458390899,
        "updated_at": 1458390899,
        "pivot": {
          "department_id": 4,
          "group_id": 1
        }
      }
    ],
    "operators": [
      {
        "id": 1,
        "firstname": "Joe",
        "lastname": "Blogs",
        "email": "joe.blogs@mycompany.com",
        "confirmed": 1,
        "organisation_id": null,
        "organisation_access_level": null,
        "country": null,
        "language_code": null,
        "timezone": null,
        "avatar": "...",
        "created_at": 1445441612,
        "updated_at": 1445954346,
        "formatted_name": "Joe Blogs",
        "pivot": {
          "department_id": 1,
          "user_id": 1
        }
      }
    ]
  }
}

Remove the specified resource from storage.
DELETE/api/ticket/department/{id}

Example URI

DELETE /api/ticket/department/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the department!",
  "data": null
}

Filter

Pre-defined ticket filters with advanced conditions system.

Show all of the records.
GET/api/ticket/filter

Example URI

GET /api/ticket/filter
URI Parameters
HideShow
operator
integer (optional) 

Shows filters only the operator can view and calculates the number of matching tickets if viewing the filters as this operator.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "name": "Inbox",
      "user_id": null,
      "all_groups": 1,
      "condition_group_type": 1,
      "created_at": 1486732738,
      "updated_at": 1486732738,
      "ticket_count": 14
    }
  ]
}

Display the specified resource.
GET/api/ticket/filter/{id}

Example URI

GET /api/ticket/filter/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

operator
integer (optional) 

Calculates the number of matching tickets if viewing the filter as this operator.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "name": "Inbox",
    "user_id": null,
    "all_groups": 1,
    "condition_group_type": 1,
    "created_at": 1486732738,
    "updated_at": 1486732738,
    "ticket_count": 14
  }
}

Remove the specified resource from storage.
DELETE/api/ticket/filter/{id}

Example URI

DELETE /api/ticket/filter/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the filter!",
  "data": null
}

Settings

Ticket system settings.

General Settings
GET/api/ticket/settings

Example URI

GET /api/ticket/settings
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "allowed_files": "doc|docx|png|gif|jpg|jpeg|zip|rar|pdf|txt|tpl|log",
    "default_open_status": "1",
    "default_resolved_status": "2",
    "inactive_close_time": "604800",
    "ticket_notes_position": "0",
    "ticket_number_format": "%N{7}",
    "ticket_reply_order": "0"
  }
}

Channel Settings

Fetch the settings for a given channel.

Channel Settings
GET/api/ticket/{channel}/settings

Example URI

GET /api/ticket/channel/settings
URI Parameters
HideShow
channel
string (required) 

The channel name, e.g. ‘web’.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "unauthenticated_users": "1",
    "show_captcha": "1",
    "show_related_articles": "1"
  }
}

Self-Service

Type

Self-service types, individual sections in the frontend for self-service content.

Show all of the records.
GET/api/selfservice/type

Example URI

GET /api/selfservice/type
URI Parameters
HideShow
brand_id
integer (optional) 

The brand that the type belongs to.

enabled
boolean (optional) 

If the type is enabled and will show on the frontend to users.

view
boolean (optional) 

The view type, 0 for hierarchical view and 1 for list view.

show_on_dashboard
boolean (optional) 

If the most popular/latest articles should show on the frontend dashboard.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "brand_id": 1,
      "name": "Announcements",
      "slug": "announcements",
      "description": "View the latest news and announcements.",
      "order": 1,
      "enabled": 1,
      "view": 1,
      "icon": "...",
      "show_on_dashboard": 1,
      "created_at": 1418237799,
      "updated_at": 1418237799,
      "brand": {
        "id": 1,
        "name": "MyCompany",
        "system_url": "http://www.mycompany.com",
        "frontend_logo": "",
        "frontend_template": "default",
        "default_email": "support@mycompany.com",
        "global_email_header": "...",
        "global_email_footer": "...",
        "email_method": "default",
        "smtp_host": "",
        "smtp_port": 0,
        "smtp_encryption": "0",
        "smtp_requires_auth": 0,
        "smtp_username": "",
        "smtp_password": "",
        "default_country": "default",
        "default_timezone": "default",
        "date_format": "default",
        "time_format": "default",
        "default_language": "default",
        "language_toggle": 2,
        "created_at": 1458390899,
        "updated_at": 1458390899
      }
    }
  ]
}

Display the specified resource.
GET/api/selfservice/type/{id}

Example URI

GET /api/selfservice/type/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "brand_id": 1,
    "name": "Announcements",
    "slug": "announcements",
    "description": "View the latest news and announcements.",
    "order": 1,
    "enabled": 1,
    "view": 1,
    "icon": "...",
    "show_on_dashboard": 1,
    "created_at": 1418237799,
    "updated_at": 1418237799,
    "brand": {
      "id": 1,
      "name": "MyCompany",
      "system_url": "http://www.mycompany.com",
      "frontend_logo": "",
      "frontend_template": "default",
      "default_email": "support@mycompany.com",
      "global_email_header": "...",
      "global_email_footer": "...",
      "email_method": "default",
      "smtp_host": "",
      "smtp_port": 0,
      "smtp_encryption": "0",
      "smtp_requires_auth": 0,
      "smtp_username": "",
      "smtp_password": "",
      "default_country": "default",
      "default_timezone": "default",
      "date_format": "default",
      "time_format": "default",
      "default_language": "default",
      "language_toggle": 2,
      "created_at": 1458390899,
      "updated_at": 1458390899
    }
  }
}

Store a newly created resource in storage.
POST/api/selfservice/type

Example URI

POST /api/selfservice/type
URI Parameters
HideShow
brand_id
integer (required) 

The ID of the brand this self-service type will be shown under.

name
string (required) 

The name of the type. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (required) 

A description of the type, shows under the name on the frontend dashboard. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

enabled
boolean (optional) Default: 1 

If the type is enabled and visible in the frontend.

view
boolean (required) 

The view type, 0 for hierarchical view and 1 for list view.

default_icon
int (optional) Default: 0 

Which default icon to use, a value of 0 (Announcements), 1 (Knowledgebase) or 2 (Downloads).

order
int (optional) 

Position of the type.

show_on_dashboard
boolean (optional) Default: 1 

Shows some articles on the frontend dashboard. If view is set to hierarchical, it will show the 5 most viewed articles, else if list, it will show the 5 latest articles.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
brand_id=1&name=Announcements&description=View+the+latest+news+and+announcements.&view=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new type!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "name": "Announcements",
    "slug": "announcements",
    "description": "View the latest news and announcements.",
    "order": 1,
    "enabled": 1,
    "view": 1,
    "show_on_dashboard": 1,
    "created_at": 1418237799,
    "updated_at": 1418237799,
    "brand": {
      "id": 1,
      "name": "MyCompany",
      "system_url": "http://www.mycompany.com",
      "frontend_logo": "",
      "frontend_template": "default",
      "default_email": "support@mycompany.com",
      "global_email_header": "...",
      "global_email_footer": "...",
      "email_method": "default",
      "smtp_host": "",
      "smtp_port": 0,
      "smtp_encryption": "0",
      "smtp_requires_auth": 0,
      "smtp_username": "",
      "smtp_password": "",
      "default_country": "default",
      "default_timezone": "default",
      "date_format": "default",
      "time_format": "default",
      "default_language": "default",
      "language_toggle": 2,
      "created_at": 1458390899,
      "updated_at": 1458390899
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/selfservice/type/{id}

Example URI

PUT /api/selfservice/type/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

brand_id
integer (optional) 

The ID of the brand this self-service type will be shown under.

name
string (optional) 

The name of the type. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

description
string (optional) 

A description of the type, shows on the frontend dashboard. To add translations for the description, add description:locale, such as ‘description:en’, to the request to store a description for that given translation.

enabled
boolean (optional) 

If the type is enabled and visible in the frontend.

view
boolean (optional) 

The view type, 0 for hierarchical view and 1 for list view.

order
int (optional) 

Position of the type.

show_on_dashboard
boolean (optional) 

Shows some articles on the frontend dashboard. If view is set to hierarchical, it will show the 5 most viewed articles, else if list, it will show the 5 latest articles.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Announcements&view=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the type!",
  "data": {
    "id": 1,
    "brand_id": 1,
    "name": "Announcements",
    "slug": "announcements",
    "description": "View the latest news and announcements.",
    "order": 1,
    "enabled": 1,
    "view": 1,
    "icon": "...",
    "show_on_dashboard": 1,
    "created_at": 1418237799,
    "updated_at": 1418237799,
    "brand": {
      "id": 1,
      "name": "MyCompany",
      "system_url": "http://www.mycompany.com",
      "frontend_logo": "",
      "frontend_template": "default",
      "default_email": "support@mycompany.com",
      "global_email_header": "...",
      "global_email_footer": "...",
      "email_method": "default",
      "smtp_host": "",
      "smtp_port": 0,
      "smtp_encryption": "0",
      "smtp_requires_auth": 0,
      "smtp_username": "",
      "smtp_password": "",
      "default_country": "default",
      "default_timezone": "default",
      "date_format": "default",
      "time_format": "default",
      "default_language": "default",
      "language_toggle": 2,
      "created_at": 1458390899,
      "updated_at": 1458390899
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The type with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/type/{id}

Example URI

DELETE /api/selfservice/type/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the type!",
  "data": null
}

Tag

Self-service tags, another way to categorise articles.

Show all of the records.
GET/api/selfservice/tag

Example URI

GET /api/selfservice/tag
URI Parameters
HideShow
start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 10,
      "name": "Reseller",
      "slug": "reseller",
      "created_at": 1418237799,
      "updated_at": 1418237799
    }
  ]
}

Display the specified resource.
GET/api/selfservice/tag/{id}

Example URI

GET /api/selfservice/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 10,
    "name": "Reseller",
    "slug": "reseller",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}

Store a newly created resource in storage.
POST/api/selfservice/tag

Example URI

POST /api/selfservice/tag
URI Parameters
HideShow
name
string (required) 

The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Reseller
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new tag!",
  "data": {
    "id": 10,
    "name": "Reseller",
    "slug": "reseller",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/selfservice/tag/{id}

Example URI

PUT /api/selfservice/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

name
string (optional) 

The name of the tag. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
name=Reseller
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the tag!",
  "data": {
    "id": 10,
    "name": "Reseller",
    "slug": "reseller",
    "created_at": 1418237799,
    "updated_at": 1418237799
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The tag with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/tag/{id}

Example URI

DELETE /api/selfservice/tag/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the tag!",
  "data": null
}

Category

Self-service categories, filterable by type.

Show all of the records.
GET/api/selfservice/category

Example URI

GET /api/selfservice/category
URI Parameters
HideShow
type_id
integer (optional) 

The type of the categories.

parent_id
integer (optional) 

Fetch categories with the given parent, set to 0 to fetch all top level categories only.

public
boolean (optional) 

If the category is public to users.

parent_public
boolean (optional) 

If the top level parent category is public to users.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "type_id": 1,
      "parent": null,
      "name": "General",
      "slug": "general",
      "public": 1,
      "parent_public": 1,
      "created_at": 1446329149,
      "updated_at": 1446329149,
      "type": {
        "id": 1,
        "name": "Announcements",
        "slug": "announcements",
        "description": "View the latest news and announcements.",
        "view": 1,
        "icon": "...",
        "show_on_dashboard": 1,
        "created_at": 1445611905,
        "updated_at": 1445611905
      }
    }
  ]
}

Display the specified resource.
GET/api/selfservice/category/{id}

Example URI

GET /api/selfservice/category/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "type_id": 1,
    "parent": null,
    "name": "General",
    "slug": "general",
    "public": 1,
    "parent_public": 1,
    "created_at": 1446329149,
    "updated_at": 1446329149,
    "type": {
      "id": 1,
      "name": "Announcements",
      "slug": "announcements",
      "description": "View the latest news and announcements.",
      "view": 1,
      "icon": "...",
      "show_on_dashboard": 1,
      "created_at": 1445611905,
      "updated_at": 1445611905
    }
  }
}

Store a newly created resource in storage.
POST/api/selfservice/category

Example URI

POST /api/selfservice/category
URI Parameters
HideShow
type_id
integer (required) 

The type that the category belongs to.

name
string (required) 

The name of the category. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation.

parent_id
integer (optional) 

If the category is a child, enter the parent ID. The parent must have the same type.

public
boolean (optional) Default: 0 

If the category is public to users.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&name=Support&public=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new category!",
  "data": {
    "id": 1,
    "type_id": 1,
    "parent": null,
    "name": "General",
    "slug": "general",
    "public": 1,
    "parent_public": 1,
    "created_at": 1446329149,
    "updated_at": 1446329149,
    "type": {
      "id": 1,
      "name": "Announcements",
      "slug": "announcements",
      "description": "View the latest news and announcements.",
      "view": 1,
      "icon": "...",
      "show_on_dashboard": 1,
      "created_at": 1445611905,
      "updated_at": 1445611905
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/selfservice/category/{id}

Example URI

PUT /api/selfservice/category/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

type_id
integer (optional) 

The type that the category belongs to.

name
string (optional) 

The name of the category. To add translations for the name, add name:locale, such as ‘name:en’, to the request to store a name for that given translation. Including at least one translation will delete any existing translations that have not been included.

parent_id
integer (optional) 

If the category is a child, enter the parent ID. The parent must have the same type.

public
boolean (optional) Default: 0 

If the category is public to users.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&name=Support&public=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the category!",
  "data": {
    "id": 1,
    "type_id": 1,
    "parent": null,
    "name": "General",
    "slug": "general",
    "public": 1,
    "parent_public": 1,
    "created_at": 1446329149,
    "updated_at": 1446329149,
    "type": {
      "id": 1,
      "name": "Announcements",
      "slug": "announcements",
      "description": "View the latest news and announcements.",
      "view": 1,
      "icon": "...",
      "show_on_dashboard": 1,
      "created_at": 1445611905,
      "updated_at": 1445611905
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The category with given ID was not found.",
  "data": null
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/category/{id}

Example URI

DELETE /api/selfservice/category/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the category!",
  "data": null
}

Article

Self-service articles, filterable by type, category and tags.

Show all of the records.
GET/api/selfservice/article

Example URI

GET /api/selfservice/article
URI Parameters
HideShow
type_id
integer (optional) 

The type of the articles.

category_id
integer (optional) 

The category of the articles.

tag_id
integer (optional) 

The tag associated with articles.

include_subcategories
boolean (optional) Default: 0 

Include articles from subcategories of given category

published
boolean (optional) 

Show published (1) articles or unpublished (0) articles only.

protected
boolean (optional) 

Show protected (1) articles or unprotected (0) articles only.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "author_id": 1,
      "title": "Test Article",
      "slug": "test-article",
      "keywords": "test, article",
      "excerpt": "This is an article",
      "text": "An article for the masses.",
      "positive_rating": 0,
      "total_rating": 0,
      "published": 1,
      "protected": 0,
      "created_at": 1446329199,
      "updated_at": 1446329199,
      "frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
      "categories": {
        "0": {
          "id": 1,
          "type_id": 1,
          "parent_id": null,
          "name": "General",
          "slug": "general",
          "public": 1,
          "parent_public": 1,
          "created_at": 1449600034,
          "updated_at": 1449600034,
          "pivot": {
            "article_id": 1,
            "category_id": 1
          }
        },
        "types": [
          {
            "id": 1,
            "name": "Announcements",
            "slug": "announcements",
            "description": "View the latest news and announcements.",
            "view": 1,
            "icon": "...",
            "show_on_dashboard": 1,
            "created_at": 1445611905,
            "updated_at": 1445611905,
            "pivot": {
              "article_id": 1,
              "type_id": 1,
              "views": 1
            }
          }
        ],
        "tags": [
          {
            "id": 1,
            "name": "Test",
            "slug": "test",
            "created_at": 1449599991,
            "updated_at": 1449600099,
            "pivot": {
              "article_id": 1,
              "tag_id": 1
            }
          }
        ],
        "attachments": []
      }
    }
  ]
}

Display the specified resource. Also can add a view to the article view counter.
GET/api/selfservice/article/{id}

Example URI

GET /api/selfservice/article/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

type_id
integer (optional) 

The article type, recommended to include if you are trying to show the article for a known self-service type.

increment_views: (boolean, optional) - Increment the article view count, requires the type_id.
string (required) 
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "author_id": 1,
    "title": "Test Article",
    "slug": "test-article",
    "keywords": "test, article",
    "excerpt": "This is an article",
    "text": "An article for the masses.",
    "positive_rating": 0,
    "total_rating": 0,
    "published": 1,
    "protected": 0,
    "created_at": 1446329199,
    "updated_at": 1446329199,
    "frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
    "categories": {
      "0": {
        "id": 1,
        "type_id": 1,
        "parent_id": null,
        "name": "General",
        "slug": "general",
        "public": 1,
        "parent_public": 1,
        "created_at": 1449600034,
        "updated_at": 1449600034,
        "pivot": {
          "article_id": 1,
          "category_id": 1
        }
      },
      "types": [
        {
          "id": 1,
          "name": "Announcements",
          "slug": "announcements",
          "description": "View the latest news and announcements.",
          "view": 1,
          "icon": "...",
          "show_on_dashboard": 1,
          "created_at": 1445611905,
          "updated_at": 1445611905,
          "pivot": {
            "article_id": 1,
            "type_id": 1,
            "views": 1
          }
        }
      ],
      "tags": [
        {
          "id": 1,
          "name": "Test",
          "slug": "test",
          "created_at": 1449599991,
          "updated_at": 1449600099,
          "pivot": {
            "article_id": 1,
            "tag_id": 1
          }
        }
      ],
      "attachments": []
    }
  }
}

Store a newly created resource in storage.
POST/api/selfservice/article

Example URI

POST /api/selfservice/article
URI Parameters
HideShow
author_id
integer (required) 

The ID of the operator who has written this article.

title
string (required) 

The title of the article. To add translations for the title, add title:locale, such as ‘title:en’, to the request to store a title for that given translation.

keywords
string (optional) 

Any keywords for the article, mainly used for SEO. To add translations for the keywords, add keywords:locale, such as ‘keywords:en’, to the request to store keywords for that given translation.

excerpt
string (optional) 

An excerpt of the article, maximum 255 characters. To add translations for the excerpt, add excerpt:locale, such as ‘excerpt:en’, to the request to store an excerpt for that given translation.

text
string (required) 

The article text. To add translations for the article text, add text:locale, such as ‘text:en’, to the request to store article text for that given translation.

published
boolean (optional) Default: 0 

If the article is published to users.

protected
boolean (optional) Default: 0 

If only logged in users can view the article.

category
array (required) 

An array of category IDs to which the article belongs to.

tag
array (optional) 

An array of tags for the article, use the full tag name and not IDs.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
author_id=1&title=Test+Article&excerpt=This+is+a+test+article+for+the+help+desk&text=This+is+a+test+article,+please+make+sure+this+is+right+before+publishing+it.&published=1&protected=0&category[]=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new article!",
  "data": {
    "id": 1,
    "author_id": 1,
    "title": "Test Article",
    "slug": "test-article",
    "keywords": "test, article",
    "excerpt": "This is an article",
    "text": "An article for the masses.",
    "positive_rating": 0,
    "total_rating": 0,
    "published": 1,
    "protected": 0,
    "created_at": 1446329199,
    "updated_at": 1446329199,
    "frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
    "categories": {
      "0": {
        "id": 1,
        "type_id": 1,
        "parent_id": null,
        "name": "General",
        "slug": "general",
        "public": 1,
        "parent_public": 1,
        "created_at": 1449600034,
        "updated_at": 1449600034,
        "pivot": {
          "article_id": 1,
          "category_id": 1
        }
      },
      "types": [
        {
          "id": 1,
          "name": "Announcements",
          "slug": "announcements",
          "description": "View the latest news and announcements.",
          "view": 1,
          "icon": "...",
          "show_on_dashboard": 1,
          "created_at": 1445611905,
          "updated_at": 1445611905,
          "pivot": {
            "article_id": 1,
            "type_id": 1,
            "views": 1
          }
        }
      ],
      "tags": [
        {
          "id": 1,
          "name": "Test",
          "slug": "test",
          "created_at": 1449599991,
          "updated_at": 1449600099,
          "pivot": {
            "article_id": 1,
            "tag_id": 1
          }
        }
      ],
      "attachments": []
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The name field is required.",
  "data": null
}

Update the specified resource in storage. Including a translation for any relevant field will delete any existing translations that haven't been included in the request.
PUT/api/selfservice/article/{id}

Example URI

PUT /api/selfservice/article/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

author_id
integer (optional) 

The ID of the operator who has written this article.

title
string (optional) 

The title of the article. To add translations for the title, add title:locale, such as ‘title:en’, to the request to store a title for that given translation.

keywords
string (optional) 

Any keywords for the article, mainly used for SEO. To add translations for the keywords, add keywords:locale, such as ‘keywords:en’, to the request to store keywords for that given translation.

excerpt
string (optional) 

An excerpt of the article, maximum 255 characters. To add translations for the excerpt, add excerpt:locale, such as ‘excerpt:en’, to the request to store an excerpt for that given translation.

text
string (optional) 

The article text. To add translations for the article text, add text:locale, such as ‘text:en’, to the request to store article text for that given translation.

published
boolean (optional) Default: 0 

If the article is published to users.

protected
boolean (optional) Default: 0 

If only logged in users can view the article.

category
array (optional) 

An array of category IDs to which the article belongs to.

tag
array (optional) 

An array of tags for the article, use the full tag name and not IDs.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
type_id=1&author_id=1&title=Test+Article&excerpt=This+is+a+test+article+for+the+help+desk&text=This+is+a+test+article,+please+make+sure+this+is+right+before+publishing+it.&published=1&protected=0&category[]=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the article!",
  "data": {
    "id": 1,
    "author_id": 1,
    "title": "Test Article",
    "slug": "test-article",
    "keywords": "test, article",
    "excerpt": "This is an article",
    "text": "An article for the masses.",
    "positive_rating": 0,
    "total_rating": 0,
    "published": 1,
    "protected": 0,
    "created_at": 1446329199,
    "updated_at": 1446329199,
    "frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
    "categories": {
      "0": {
        "id": 1,
        "type_id": 1,
        "parent_id": null,
        "name": "General",
        "slug": "general",
        "public": 1,
        "parent_public": 1,
        "created_at": 1449600034,
        "updated_at": 1449600034,
        "pivot": {
          "article_id": 1,
          "category_id": 1
        }
      },
      "types": [
        {
          "id": 1,
          "name": "Announcements",
          "slug": "announcements",
          "description": "View the latest news and announcements.",
          "view": 1,
          "icon": "...",
          "show_on_dashboard": 1,
          "created_at": 1445611905,
          "updated_at": 1445611905,
          "pivot": {
            "article_id": 1,
            "type_id": 1,
            "views": 1
          }
        }
      ],
      "tags": [
        {
          "id": 1,
          "name": "Test",
          "slug": "test",
          "created_at": 1449599991,
          "updated_at": 1449600099,
          "pivot": {
            "article_id": 1,
            "tag_id": 1
          }
        }
      ],
      "attachments": []
    }
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The article with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/article/{id}

Example URI

DELETE /api/selfservice/article/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the article!",
  "data": null
}

Fetch related articles for a term.
GET/api/selfservice/article/related

Example URI

GET /api/selfservice/article/related
URI Parameters
HideShow
term
string (required) 

The query to use when searching for related articles.

type_id
integer (required) 

If we want to limit it to a single type.

protected
boolean (optional) Default: 0 

If only logged in users can view the article.

limit
integer (optional) Default: 3 

The amount of results to fetch.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
term=test&type_id=1
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "author_id": 1,
      "title": "Test Article",
      "slug": "test-article",
      "keywords": "test, article",
      "excerpt": "This is an article",
      "text": "An article for the masses.",
      "positive_rating": 0,
      "total_rating": 0,
      "published": 1,
      "protected": 0,
      "created_at": 1446329199,
      "updated_at": 1446329199,
      "frontend_url": "http://localhost/supportpal_v2/Announcements/article/test-article",
      "categories": {
        "0": {
          "id": 1,
          "type_id": 1,
          "parent_id": null,
          "name": "General",
          "slug": "general",
          "public": 1,
          "parent_public": 1,
          "created_at": 1449600034,
          "updated_at": 1449600034,
          "pivot": {
            "article_id": 1,
            "category_id": 1
          }
        },
        "types": [
          {
            "id": 1,
            "name": "Announcements",
            "slug": "announcements",
            "description": "View the latest news and announcements.",
            "view": 1,
            "icon": "...",
            "show_on_dashboard": 1,
            "created_at": 1445611905,
            "updated_at": 1445611905,
            "pivot": {
              "article_id": 1,
              "type_id": 1,
              "views": 1
            }
          }
        ],
        "tags": [
          {
            "id": 1,
            "name": "Test",
            "slug": "test",
            "created_at": 1449599991,
            "updated_at": 1449600099,
            "pivot": {
              "article_id": 1,
              "tag_id": 1
            }
          }
        ],
        "attachments": []
      }
    }
  ]
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The term field is required.",
  "data": null
}

Comment

Comments made on self-service articles.

Show all of the records.
GET/api/selfservice/comment

Example URI

GET /api/selfservice/comment
URI Parameters
HideShow
article_id
integer (optional) 

The article that the comment was posted on.

type_id
integer (optional) 

The self-service type of the article that the comment was posted on.

status
integer (optional) 

The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.

parent_id
integer (optional) 

The ID of the parent comment.

root_parent_id
integer (optional) 

The ID of the root (upper most) parent comment.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "article_id": 1,
      "type_id": 1,
      "author_id": 1,
      "text": "This is a comment!",
      "parent_id": null,
      "root_parent_id": null,
      "rating": 0,
      "status": 0,
      "notify_reply": 1,
      "created_at": 1446331613,
      "updated_at": 144633161
    }
  ]
}

Display the specified resource.
GET/api/selfservice/comment/{id}

Example URI

GET /api/selfservice/comment/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "article_id": 1,
    "type_id": 1,
    "author_id": 1,
    "text": "This is a comment!",
    "parent_id": null,
    "root_parent_id": null,
    "rating": 0,
    "status": 0,
    "notify_reply": 1,
    "created_at": 1446331613,
    "updated_at": 144633161
  }
}

Store a newly created resource in storage.
POST/api/selfservice/comment

Example URI

POST /api/selfservice/comment
URI Parameters
HideShow
article_id
integer (required) 

The article the the comment is being posted to.

type_id
integer (required) 

The type of the article the the comment is being posted to.

parent_id
integer (optional) 

If this comment is a reply, set as the parent comment ID.

author_id
integer (optional) 

The commenter user ID, use the name field if not currently a user.

name
string (optional) 

The name of the commenter (when not logged in). Required if no author_id set.

text
string (required) 

The comment text.

status
integer (optional) Default: 0 

The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.

notify_reply
boolean (optional) Default: 0 

If the user would like to be notified on a reply, only applicable to users with email addresses.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
article_id=1&type_id=1&author_id=1&text=This+is+a+comment!
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new comment!",
  "data": {
    "id": 1,
    "article_id": 1,
    "type_id": 1,
    "author_id": 1,
    "text": "This is a comment!",
    "parent_id": null,
    "root_parent_id": null,
    "rating": 0,
    "status": 0,
    "notify_reply": 1,
    "created_at": 1446331613,
    "updated_at": 144633161
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The article_id field is required.",
  "data": null
}

Update the specified resource in storage.
PUT/api/selfservice/comment/{id}

Example URI

PUT /api/selfservice/comment/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

article_id
integer (optional) 

The article the the comment is being posted to.

type_id
integer (optional) 

The type of the article the the comment is being posted to.

parent_id
integer (optional) 

If this comment is a reply, set as the parent comment ID.

text
string (optional) 

The comment text.

status
integer (optional) 

The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.

notify_reply
boolean (optional) 

If the user would like to be notified on a reply, only applicable to users with email addresses.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
text=This+is+a+comment!
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully updated the comment!",
  "data": {
    "id": 1,
    "article_id": 1,
    "type_id": 1,
    "author_id": 1,
    "text": "This is a comment!",
    "parent_id": null,
    "root_parent_id": null,
    "rating": 0,
    "status": 0,
    "notify_reply": 1,
    "created_at": 1446331613,
    "updated_at": 144633161
  }
}
Response  404
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The comment with given ID was not found.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/comment/{id}

Example URI

DELETE /api/selfservice/comment/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the comment!",
  "data": null
}

Article Attachment

Class AttachmentController

Show all of the records.
GET/api/selfservice/attachment

Example URI

GET /api/selfservice/attachment
URI Parameters
HideShow
article_id
integer (optional) 

Only fetch attachments associated with the article ID.

start
integer (optional) Default: 0 

The first result to start from.

limit
integer (optional) Default: 50 

The amount of results to fetch.

order_column
string (optional) Default: id 

The column to sort by.

order_direction
string (optional) Default: asc 

The ordering of the results.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "count": 1,
  "data": [
    {
      "id": 1,
      "upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
      "article_id": 1,
      "original_name": "filename.png",
      "created_at": 1470400190,
      "updated_at": 1470400190,
      "upload": {
        "id": 1,
        "hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
        "filename": "filename.png",
        "folder": "selfservice",
        "mime": "image/png",
        "size": "6.6 KB",
        "created_at": 1470400188,
        "updated_at": 1470400188
      }
    }
  ]
}

Display the specified resource.
GET/api/selfservice/attachment/{id}

Example URI

GET /api/selfservice/attachment/id
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "id": 1,
    "upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
    "article_id": 1,
    "original_name": "filename.png",
    "created_at": 1470400190,
    "updated_at": 1470400190,
    "upload": {
      "id": 1,
      "hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
      "filename": "filename.png",
      "folder": "selfservice",
      "mime": "image/png",
      "size": "6.6 KB",
      "created_at": 1470400188,
      "updated_at": 1470400188
    }
  }
}

Download the specified resource. Returns file data.
GET/api/selfservice/attachment/{id}/download

Example URI

GET /api/selfservice/attachment/id/download
URI Parameters
HideShow
id
integer (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json

Store a newly created resource in storage.
POST/api/selfservice/attachment

Example URI

POST /api/selfservice/attachment
URI Parameters
HideShow
article_id
integer (required) 

The article to associate the attachment with.

filename
string (required) 

The name of the file.

contents
string (required) 

The base64-encoded file contents being uploaded.

Request
HideShow
Headers
Content-Type: application/x-www-form-urlencoded
Body
article_id=1&filename=hello.jpg&contents=MQ==
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully created new attachment!",
  "data": {
    "id": 1,
    "upload_hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
    "article_id": 1,
    "original_name": "filename.png",
    "created_at": 1470400190,
    "updated_at": 1470400190,
    "upload": {
      "id": 1,
      "hash": "3f9f475bb59e66165a0a97d2757a23366777a061",
      "filename": "filename.png",
      "folder": "selfservice",
      "mime": "image/png",
      "size": "6.6 KB",
      "created_at": 1470400188,
      "updated_at": 1470400188
    }
  }
}
Response  422
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "error",
  "message": "The filename field is required.",
  "data": null
}

Remove the specified resource from storage.
DELETE/api/selfservice/attachment/{id}

Example URI

DELETE /api/selfservice/attachment/id
URI Parameters
HideShow
id
string (required) 

The ID of the resource.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": "Successfully deleted the attachment!",
  "data": null
}

Settings

Self-service system settings.

General Settings
GET/api/selfservice/settings

Example URI

GET /api/selfservice/settings
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": {
    "comment_captcha": "1",
    "comment_moderation": "1",
    "comment_ordering": "2",
    "comment_ratings": "1",
    "comment_threshold": "-2",
    "comment_write": "0",
    "comments_enabled": "1",
    "rating_post": "0",
    "rating_show": "0",
    "ratings_enabled": "1"
  }
}

Report

Report

List reports and view individual report data.

Show all of the records.
GET/api/report

Example URI

GET /api/report
Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": [
    {
      "Operator": [
        {
          "name": "Total Ticket Replies",
          "slug": "TotalTicketReplies"
        }
      ]
    }
  ]
}

Display the specified resource.
GET/api/report/{category}/{name}

Example URI

GET /api/report/category/name
URI Parameters
HideShow
category
string (required) 

The name of the category the report is in.

name
string (required) 

The name of the report.

Response  200
HideShow
Headers
Content-Type: application/json
Body
{
  "status": "success",
  "message": null,
  "data": [
    {
      "Operator": "John Smith",
      "Messages": 8
    },
    {
      "Operator": "Anne Hill",
      "Messages": 10
    }
  ]
}

Generated by aglio on 05 Sep 2017