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
- enabled
boolean(optional)If the brand is enabled
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- ip
string(optional)Search with an exact IP address.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 1The ban should not let this IP log in as a user on the frontend.
- event_operator
boolean(optional) Default: 1The ban should not let this IP log in as an operator.
- event_api
boolean(optional) Default: 1The 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
ip=192.168.1.2&reason=Abuse&type=1200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The ip field is required.",
"data": null
}Update the specified resource in storage.PUT/api/core/ipban/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
ip=192.168.1.2&reason=Abuse&type=1200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- ip
string(optional)Search with an exact IP address.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- ip
string(required)The IP address being whitelisted.
- description
string(optional)A description of the IP being whitelisted.
- event_user
boolean(optional) Default: 1The whitelisting should apply when logging in as a user on the frontend.
- event_operator
boolean(optional) Default: 1The whitelisting should apply when logging in as an operator.
- event_api
boolean(optional) Default: 1The whitelisting should apply when using the API.
Headers
Content-Type: application/x-www-form-urlencodedBody
ip=127.0.0.1&description=Localhost200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The ip field is required.",
"data": null
}Update the specified resource in storage.PUT/api/core/ipwhitelist/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
ip=127.0.0.1&description=Localhost200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the whitelisted ip!",
"data": null
}Language ¶
The installed languages in the system.
Show all of the records.GET/api/core/language
Example URI
- enabled
boolean(optional)If the language is enabled.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": null,
"count": 1,
"data": [
{
"name": "English",
"code": "en",
"enabled": 0,
"created_at": 1507749920,
"updated_at": 1509574199,
"translations": []
}
]
}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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 1Check against ticket messages.
- event_comment
boolean(optional) Default: 1Check against article comments.
Headers
Content-Type: application/x-www-form-urlencodedBody
text=Pills&type=0200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The text field is required.",
"data": null
}Update the specified resource in storage.PUT/api/core/spamrule/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
text=Pills&type=0200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the spam rule!",
"data": null
}Settings ¶
Core system settings.
General SettingsGET/api/core/settings
Example URI
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
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: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/user/{id}
Example URI
- 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.
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: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1200Headers
Content-Type: application/jsonBody
{
"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"
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the user!",
"data": null
}Operator ¶
Staff accounts.
Show all of the records.GET/api/user/operator
Example URI
string(optional)Search for operators by email.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- firstname
string(required)The first name of the operator.
- lastname
string(required)The last name of the operator.
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: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/operator/{id}
Example URI
- 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.
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: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
firstname=Joe&lastname=Bloggs&email=jbloggs@email.com&confirmed=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Acme200Headers
Content-Type: application/jsonBody
{
"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
}
]
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/organisation/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Acme200Headers
Content-Type: application/jsonBody
{
"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
}
]
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: #ffffffThe hex colour of the group.
- roles
array(optional)An array of role IDs that the group belongs to.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Local200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Local200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: #ffffffThe 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Sales200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/operatorgroup/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Sales200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- brand_id
integer(optional)Fetch only the custom fields associated with a given brand.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- brand
array(optional)An array of brand IDs that the field is available in.
- required
boolean(optional) Default: 0Whether the custom field is required to submit the form.
- public
boolean(optional) Default: 1Whether the custom field should be visible to users.
- encrypted
boolean(optional) Default: 0Whether to encrypt the custom field value in the database.
- locked
boolean(optional) Default: 0Whether to prevent edits to the custom field.
- options
array(optional)An array of options in the format of ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=VAT+Number&type=8200Headers
Content-Type: application/jsonBody
{
"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": []
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/customfield/{id}
Example URI
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- 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 in the format of ‘options[][id]’ and ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Local200Headers
Content-Type: application/jsonBody
{
"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": []
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- brand_id
integer(optional)Fetch only the custom fields associated with a given brand.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- brand
array(optional)An array of brand IDs that the field is available in.
- required
boolean(optional) Default: 0Whether the custom field is required to submit the form.
- public
boolean(optional) Default: 1Whether the custom field should be visible on the frontend.
- encrypted
boolean(optional) Default: 0Whether to encrypt the custom field value in the database.
- locked
boolean(optional) Default: 0Whether to prevent edits to the custom field.
- options
array(optional)An array of options in the format of ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=VAT+Number&type=8200Headers
Content-Type: application/jsonBody
{
"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": []
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/user/organisationcustomfield/{id}
Example URI
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- 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 in the format of ‘options[][id]’ and ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Local200Headers
Content-Type: application/jsonBody
{
"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": []
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Administrator&permission[1]=1200Headers
Content-Type: application/jsonBody
{
"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
}
}
]
}
}422Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Local200Headers
Content-Type: application/jsonBody
{
"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
}
}
]
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the role!",
"data": null
}Permission ¶
Permissions for operators.
Show all of the records.GET/api/user/permission
Example URI
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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 SettingsGET/api/user/settings
Example URI
200Headers
Content-Type: application/jsonBody
{
"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
- 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).
- customfield
array(optional)Filter by custom field value, an array keyed by custom field ID with a string or custom field option ID as the value. Performs an equal or contains search depending on the custom field type.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- user
integer(optional)The user opening the ticket, an operator ID is required if opening an internal ticket.
- on_behalf_of
integer(optional)When opening a ticket as an operator, specify a user ID to open the ticket on behalf of.
- 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: 0If 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: 1Whether to send an email to the user(s) about the new ticket.
- send_operators_email
boolean(optional) Default: 1Whether 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
user=2&department=2&status=1&priority=1&subject=Test&text=Testing+this200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The department field is required.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/ticket/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
department=2200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the ticket!",
"data": null
}Message ¶
Class TicketMessageController
Show all of the records.GET/api/ticket/message
Example URI
- ticket_id
integer(required)Ticket ID to fetch messages for.
- include_draft
boolean(optional) Default: 0Whether to include drafts.
- by
boolean(optional)Filter by messages posted by operator (0) or users (1) only.
- type
boolean(optional)Filter by ticket messages (0) or ticket notes (1) only.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0Whether we’re adding a normal message or an operator note (0 or 1).
- text
string(required)The message text.
- cc
array(optional)An array of email addresses to CC on the ticket.
- is_draft
integer(optional) Default: 0Whether the message is a draft.
- send_user_email
integer(optional) Default: 1If an operator reply, whether to send an email to the user(s). If a user reply, whether to send a notification to CC’ed email addresses.
- send_operators_email
integer(optional) Default: 1If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
ticket_id=1&user_id=1&text=Test200Headers
Content-Type: application/jsonBody
{
"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": "Test",
"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"
}
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The selected user id is invalid.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/message/{id}
Example URI
- id
integer(required)The ID of the resource.
- text
string(required)The replacement text for the message.
Headers
Content-Type: application/x-www-form-urlencodedBody
text=I've+edited+this+message.200Headers
Content-Type: application/jsonBody
{
"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"
}
}
}422Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the message!",
"data": null
}Forward ¶
Class TicketForwardController
Forward to a third-party from a ticket.POST/api/ticket/forward
Example URI
- ticket_id
string(required)The ticket we’re forwarding from.
- user_id
string(required)The user we’re posting on behalf of, must be an operator.
- text
string(required)The email text.
- from_address
mixed(optional)The from email address on the forwarded email, enter a department email ID or ‘me’ to set as the operator’s email address. Defaults to the ticket’s department email.
- to_address
array(optional)An array of email addresses that the forwarded email will be sent to. Required if no CC or BCC emails set.
- cc_address
array(optional)An array of email addresses that will be CC’ed in the forwarded email. Required if no TO or BCC emails set.
- bcc_address
array(optional)An array of email addresses that will be BCC’ed in the forwarded email. Required if no TO or CC emails set.
- subject
string(required)The email subject.
- is_draft
integer(optional) Default: 0Whether the message is a draft.
- attachment[n][filename]
string(optional)Attachment filename.
- attachment[n][contents]
string(optional)Base64-encoded file contents.
Headers
Content-Type: application/x-www-form-urlencodedBody
ticket_id=1&user_id=1&text=This+is+forwarded+to_address[]=supplier@company.com&subject=Please+check+this200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully created new message!",
"data": {
"id": 2,
"ticket_id": 1,
"channel_id": 1,
"user_id": 1,
"user_ip_address": null,
"by": 0,
"type": 2,
"text": "This is forwarded",
"is_draft": 0,
"social_id": null,
"extra": {
"to_address": [
"supplier@company.com"
],
"cc_address": null,
"bcc_address": null
},
"created_at": 1445525220,
"updated_at": 1445525220,
"user": {
"id": 2,
"role": 1,
"firstname": "Joe",
"lastname": "Bloggs",
"email": "jbloggs@email.com",
"confirmed": 1,
"organisation_id": null,
"organisation_access_level": null,
"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"
}
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The selected user id is invalid.",
"data": null
}Attachment ¶
Ticket attachments, each assigned to a specific ticket message.
Show all of the records.GET/api/ticket/attachment
Example URI
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonStore a newly created resource in storage.POST/api/ticket/attachment
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
message_id=1&filename=hello.jpg&contents=MQ==200Headers
Content-Type: application/jsonBody
{
"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
}
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The filename field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/attachment/{id}
Example URI
- id
string(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: #ffffffThe colour of the status.
- auto_close
integer(required)Whether tickets should be automatically closed.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Open&auto_close=0200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/status/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Open&colour=#999999200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The status with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/status/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- department_id
integer(optional)Fetch only the priorities associated with a given department
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: #ffffffThe colour of the priority.
- depts
array(optional)List of department IDs.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Low&colour=#666200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully created new priority!",
"data": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/priority/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Low&colour=#999999200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully updated the priority!",
"data": {
"id": 1,
"name": "Low",
"colour": "#3498db",
"order": 1,
"created_at": 1445441559,
"updated_at": 1445441559
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The priority with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/priority/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: #ddddddThe colour of the tag.
Headers
Content-Type: application/jsonBody
{
"name": "Reseller"
}200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully created new tag!",
"data": {
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/tag/{id}
Example URI
- 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.
Headers
Content-Type: application/jsonBody
{
"name": "Reseller"
}200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully updated the tag!",
"data": {
"id": 10,
"name": "Reseller",
"colour": "#dddddd",
"created_at": 1418237799,
"updated_at": 1418237799
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The tag with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/tag/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- 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: 0Whether the custom field is required to submit the form.
- public
boolean(optional) Default: 1Whether the custom field should be visible to users.
- encrypted
boolean(optional) Default: 0Whether to encrypt the custom field value in the database.
- purge
boolean(optional) Default: 0Whether to purge the custom field.
- locked
boolean(optional) Default: 0Whether to prevent edits to the custom field.
- options
array(optional)An array of options in the format of ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=IP Address&type=1&required=1&public=1&encrypted=0&purge=0&locked=0200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/ticket/customfield/{id}
Example URI
- 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.
- depends_on_field_id
integer(optional)Custom field ID that this field depends on.
- depends_on_option_id
integer(optional)Custom field option ID that this field depends on.
- 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: 0Whether the custom field is required to submit the form.
- public
boolean(optional) Default: 1Whether the custom field should be visible to users.
- encrypted
boolean(optional) Default: 0Whether to encrypt the custom field value in the database.
- purge
boolean(optional) Default: 0Whether to purge the custom field.
- locked
boolean(optional) Default: 0Whether to prevent edits to the custom field.
- options
array(optional)An array of options in the format of ‘options[][id]’ and ‘options[][value]’. Only applied to Checklist, Multiple Options, Options and Radio Buttons. To add translations, add options[][value:locale], such as ‘option[][value:en]’.
Headers
Content-Type: application/x-www-form-urlencodedBody
required=1200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The custom field with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/customfield/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Hello&text=Hi,<br/>Thank you for your message, we'll get back to you shortly.&category_id=1&public=0200Headers
Content-Type: application/jsonBody
{
"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": []
}
}422Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Low&colour=#999999200Headers
Content-Type: application/jsonBody
{
"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": []
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The canned response with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/ticket/cannedresponse/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
- registered_only
boolean(optional)Fetch departments that are only accessible to logged in users or all users.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
- operator
integer(optional)Calculates the number of matching tickets if viewing the filter as this operator.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the filter!",
"data": null
}Settings ¶
Ticket system settings.
General SettingsGET/api/ticket/settings
Example URI
200Headers
Content-Type: application/jsonBody
{
"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 SettingsGET/api/ticket/{channel}/settings
Example URI
- channel
string(required)The channel name, e.g. ‘web’.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 1If 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: 0Which 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: 1Shows 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
brand_id=1&name=Announcements&description=View+the+latest+news+and+announcements.&view=1200Headers
Content-Type: application/jsonBody
{
"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
}
}
}422Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Announcements&view=1200Headers
Content-Type: application/jsonBody
{
"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
}
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Reseller200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully created new tag!",
"data": {
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/selfservice/tag/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
name=Reseller200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully updated the tag!",
"data": {
"id": 10,
"name": "Reseller",
"slug": "reseller",
"created_at": 1418237799,
"updated_at": 1418237799
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0If the category is public to users.
Headers
Content-Type: application/x-www-form-urlencodedBody
type_id=1&name=Support&public=1200Headers
Content-Type: application/jsonBody
{
"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
}
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Update the specified resource in storage.PUT/api/selfservice/category/{id}
Example URI
- 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: 0If the category is public to users.
Headers
Content-Type: application/x-www-form-urlencodedBody
type_id=1&name=Support&public=1200Headers
Content-Type: application/jsonBody
{
"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
}
}
}404Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The category with given ID was not found.",
"data": null
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The name field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/selfservice/category/{id}
Example URI
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0Include 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- 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)
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0If the article is published to users.
- protected
boolean(optional) Default: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
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[]=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}
}422Headers
Content-Type: application/jsonBody
{
"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
- 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: 0If the article is published to users.
- protected
boolean(optional) Default: 0If 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
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[]=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the article!",
"data": null
}Fetch related articles for a term.GET/api/selfservice/article/related
Example URI
- 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: 0If only logged in users can view the article.
- limit
integer(optional) Default: 3The amount of results to fetch.
Headers
Content-Type: application/x-www-form-urlencodedBody
term=test&type_id=1200Headers
Content-Type: application/jsonBody
{
"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": []
}
}
]
}422Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- 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: 0The moderation status of the comment. 0 - Awaiting Moderation, 1 - Published, 2 - Spam.
- notify_reply
boolean(optional) Default: 0If the user would like to be notified on a reply, only applicable to users with email addresses.
Headers
Content-Type: application/x-www-form-urlencodedBody
article_id=1&type_id=1&author_id=1&text=This+is+a+comment!200Headers
Content-Type: application/jsonBody
{
"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
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The article_id field is required.",
"data": null
}Update the specified resource in storage.PUT/api/selfservice/comment/{id}
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
text=This+is+a+comment!200Headers
Content-Type: application/jsonBody
{
"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
}
}404Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the comment!",
"data": null
}Article Attachment ¶
Class AttachmentController
Show all of the records.GET/api/selfservice/attachment
Example URI
- article_id
integer(optional)Only fetch attachments associated with the article ID.
- start
integer(optional) Default: 0The first result to start from.
- limit
integer(optional) Default: 50The amount of results to fetch.
- order_column
string(optional) Default: idThe column to sort by.
- order_direction
string(optional) Default: ascThe ordering of the results.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"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
- id
integer(required)The ID of the resource.
200Headers
Content-Type: application/jsonStore a newly created resource in storage.POST/api/selfservice/attachment
Example URI
- 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.
Headers
Content-Type: application/x-www-form-urlencodedBody
article_id=1&filename=hello.jpg&contents=MQ==200Headers
Content-Type: application/jsonBody
{
"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
}
}
}422Headers
Content-Type: application/jsonBody
{
"status": "error",
"message": "The filename field is required.",
"data": null
}Remove the specified resource from storage.DELETE/api/selfservice/attachment/{id}
Example URI
- id
string(required)The ID of the resource.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": "Successfully deleted the attachment!",
"data": null
}Settings ¶
Self-service system settings.
General SettingsGET/api/selfservice/settings
Example URI
200Headers
Content-Type: application/jsonBody
{
"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
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": null,
"data": [
{
"Operator": [
{
"name": "Total Ticket Replies",
"slug": "TotalTicketReplies"
}
]
}
]
}Display the specified resource.GET/api/report/{category}/{name}
Example URI
- category
string(required)The name of the category the report is in.
- name
string(required)The name of the report.
200Headers
Content-Type: application/jsonBody
{
"status": "success",
"message": null,
"data": [
{
"Operator": "John Smith",
"Messages": 8
},
{
"Operator": "Anne Hill",
"Messages": 10
}
]
}