NAV
bash php javascript

Introduction

Welcome to the OmniCXM API! You can use our API to access OmniCXM API endpoints, which can get information on many services in our database.

We have language bindings in Shell, PHP, and NodeJs - Axios! You can view code examples in the dark area to the right, and you can switch the programming language of the examples with the tabs in the top right.

This example API documentation page was created with South Telecom. Feel free to edit it and use it as a base for your own API's documentation.

Authentication

Login

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/login' \
--header 'Authorization: Basic YWRtaW46YWRtaW4='
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/login',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['Authorization: Basic YWRtaW46YWRtaW4='],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/login',
  headers: {
    Authorization: 'Basic YWRtaW46YWRtaW4=',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "token": "8baeb4c3ca6d29fe7b42236f436f74b3-c8cbeaa0-bb57-47ec-a4b6-b7e1d929f8c0",
  "userinfo": {
    "customer_code": "C0001",
    "name": "Worldfone4x Cloud",
    "phone": "1900545463",
    "email": "4xcloud@southtelecom.vn",
    "sex": "male",
    "avatar": "https://omnicxm.worldfone.cloud/public/img/crm/default/avatar_default.png",
    "language": "vietnamese",
    "timezone": "Asia/Bangkok",
    "extension": "8001",
    "usertype": "owner"
  }
}

OmniCXM use "token" to allow access. You can login by username, password to get a new OmniCXM token by this API.

Authorization: Basic base64_encode(username:password)

HTTP Request

GET /login

Request Headers

Key Value
Content-Type application/json

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
token String TOKEN_LOGIN_API - token authentication for APIs
userinfo Object Information of user

Logout

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/logout' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/logout',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/logout',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Logout user, destroy token

HTTP Request

GET /logout

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Permission

Get modules open

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/permission/module' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/permission/module',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/permission/module',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "modules": [
    "tickets",
    "omnichat",
    "reportticketinflowsbytime",
    "reportticketinflowsbysourceandtime",
    "reportticketinflowsbycategoryandtime",
    "reportticketinflowsbyuserandtime",
    "reportcdr",
    "reportticketinflowsbysourcecategoryandtime"
  ]
}

Get list modules open

HTTP Request

GET /permission/module

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
modules Array List modules key

Get permission module

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission/tickets' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission/tickets',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission/tickets',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "permission": [
    "view",
    "create",
    "update",
    "comment",
    "viewfile",
    "downloadfile",
    "removefile",
    "merge",
    "delete"
  ]
}

Get list permission of module

HTTP Request

GET /permission/module/permission/<module>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
permission Array List permission of module

Check permission module

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "module": "tickets",
    "permission": "view"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "module": "tickets",
    "permission": "view"
  }',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  module: 'tickets',
  permission: 'view',
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/permission/module/permission',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "module": "tickets",
  "permission": "view",
  "response": true
}

Check permission of module

HTTP Request

POST /permission/module/permission

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
module String Module input
permission String Permission input
response Boolean Permission of module response

Check permission special

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/permission/special/click2call' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/permission/special/click2call',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/permission/special/click2call',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Check permission special of user

HTTP Request

GET /permission/special/<action>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Required Description
action String String special permission (sendsms, sendemail, click2call, ...)

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Users

Get infomation

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/users/getinformation' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/users/getinformation',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/users/getinformation',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "id": "60f04042ef7372af76345c2b",
    "username": "admin.C0001",
    "name": "Worldfone4x Cloud",
    "phone": "1900545463",
    "email": "4xcloud@southtelecom.vn",
    "sex": "male",
    "avatar": "https://omnicxm.worldfone.cloud/public/img/crm/default/avatar_default.png",
    "language": "vietnamese",
    "timezone": "Asia/Bangkok",
    "usertype": "owner"
  }
}

Get user information through Token

HTTP Request

GET /users/getinformation

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Get user permission

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/users/getuserpermission' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/users/getuserpermission',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/users/getuserpermission',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": [
    {
      "type": "bu",
      "name": "BOD",
      "value": "bu_61ea514ddc4883646320f24f"
    },
    {
      "type": "bu",
      "name": "Sale Department",
      "value": "bu_61d45ac06a31026117215716"
    },
    {
      "type": "user",
      "username": "admin.C0001",
      "name": "Worldfone4x Cloud",
      "value": "user_6272238633ef36ebf50126c0"
    }
  ]
}

Get all business unit, users in system

HTTP Request

GET /users/getuserpermission

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data.\$.type String user or bu
data.\$.name String Name of user or bu
data.\$.value String Value of user or bu
data.\$.username String Username of user

Update password

curl --location --request PUT 'https://pvcb-omni-api.worldfone.cloud/users/updatepassword' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "oldpassword": "admin",
    "newpassword": "000000000",
    "confirmpassword" : "000000000"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/users/updatepassword',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
    "oldpassword": "admin",
    "newpassword": "000000000",
    "confirmpassword" : "000000000"
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  oldpassword: 'admin',
  newpassword: '000000000',
  confirmpassword: '000000000',
})

var config = {
  method: 'put',
  url: 'https://pvcb-omni-api.worldfone.cloud/users/updatepassword',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": false,
  "error": "Password must be at least 8 characters in length and should include at least one upper case letter, one number, and one special character"
}

Update password

HTTP Request

PUT /users/updatepassword

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
oldpassword String Current password
newpassword String New password
confirmpassword String Confirm new password

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Update information

curl --location --request PUT 'https://pvcb-omni-api.worldfone.cloud/users/updateinformation' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name" : "4xCloud",
    "phone" : "02836222789",
    "email" : "4xdev@southtelecom.vn",
    "language" : "vietnamese",
    "timezone" : "Asia/Bangkok",
    "sex" : "male"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/users/updateinformation',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => '{
    "name" : "4xCloud",
    "phone" : "02836222789",
    "email" : "4xdev@southtelecom.vn",
    "language" : "vietnamese",
    "timezone" : "Asia/Bangkok",
    "sex" : "male"
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  name: '4xCloud',
  phone: '02836222789',
  email: '4xdev@southtelecom.vn',
  language: 'vietnamese',
  timezone: 'Asia/Bangkok',
  sex: 'male',
})

var config = {
  method: 'put',
  url: 'https://pvcb-omni-api.worldfone.cloud/users/updateinformation',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Update information user

HTTP Request

PUT /users/updateinformation

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
name String Name
phone String Phone number
email String Email
language String vietnamese or english
timezone String Timezone. Ex: Asia/Bangkok
sex String male or female

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Update avatar

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/users/updateavatar' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'file=@"/path/to/file"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/users/updateavatar',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => ['file' => new CURLFILE('/path/to/file')],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('file', fs.createReadStream('/path/to/file'))

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/users/updateavatar',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "avatar": "DOMAIN_AVATAR"
}

Update avatar

HTTP Request

POST /users/updateavatar

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
file String File image avatar

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
avatar String Domain avatar

Fields

Get fields

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'X-API-KEY: TOKEN_LOGIN_API'
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios');
var data = '';

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field',
  headers: {
    'X-API-KEY: TOKEN_LOGIN_API'
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:

{
    "status": true,
    "data": [
        {
            "name": "Basic information",
            "alias": "basicinfo",
            "show": 1,
            "position": 0,
            "positionoverview": 0,
            "default": 1,
            "module": "tickets",
            "coladd": "onecolumn",
            "coldetail": "onecolumn",
            "id": "62bea0c2976d684cdaed736d",
            "field": [
                {
                    "name": "Requester",
                    "alias": "requester",
                    "type": "combobox",
                    "default": 1,
                    "pageShow": {
                        "showgrid": 0,
                        "viewadd": 1,
                        "overview": 1
                    },
                    "property": {
                        "required": 0,
                        "unique": 0,
                        "readonly": 0
                    },
                    "tooltip": "",
                    "note": "",
                    "show": 1,
                    "col": 1,
                    "coldetail": 1,
                    "poscol1": 0,
                    "positionadd": 1,
                    "module": "tickets",
                    "positionoverview": 0,
                    "id": "62c3e9eb1a888ce1314ada94"
                },
                {
                    "name": "Account",
                    "alias": "relatedaccount",
                    "type": "combobox",
                    "default": 1,
                    "pageShow": {
                        "showgrid": 0,
                        "viewadd": 1,
                        "overview": 1
                    },
                    "property": {
                        "required": 0,
                        "unique": 0,
                        "readonly": 0
                    },
                    "tooltip": "",
                    "note": "",
                    "show": 1,
                    "col": 1,
                    "coldetail": 1,
                    "poscol1": 1,
                    "positionadd": 2,
                    "module": "tickets",
                    "positionoverview": 4,
                    "id": "62c3ea361a888ce1314ada95"
                },
                ...
            ]
    }

API get customfield is get fields with more options such as: lang, module , or get with category from API get customfield

HTTP Request

GET /settings/customfields/field

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Required Description
module String Module of customfield (accounts contacts leads tickets )
lang String ⬜️ vietnamese or english
category String ⬜️ Filter category of ticket

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of tickets

Get values link

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/link' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
  "id" : "6322db807585fd104f370dcb"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/link',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{"id" : "6322db807585fd104f370dcb"}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({"id":"6322db807585fd104f370dcb"});

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/link',
  headers: {
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "typelink": "droptotext", // droptotext or droptodrop
    "fieldmain": {
      "_id": "6322db35e80741113112acb8",
      "name": "dropdown_link_1",
      "alias": "dropdown_link_1",
      "arrDropDown": ["1", "2", "3"],
      "type": "dropdown"
    },
    "showValue": [
      {
        "value": "1",
        "show": 1
      },
      {
        "value": "2",
        "show": 0
      },
      {
        "value": "3",
        "show": 1
      }
    ]
  }
}

API get link field is get link with option such as: id from API get customfield

HTTP Request

GET /settings/customfields/field/link

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Required Description
id String id of field

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of tickets

Get data source

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/DataSource?id=63199d46e42384d4b409b5d4' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/DataSource?id=63199d46e42384d4b409b5d4',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = ''

var config = {
  method: 'get',
  url:
    'https://pvcb-omni-api.worldfone.cloud/settings/customfields/DataSource?id=63199d46e42384d4b409b5d4',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "arrDropDown": ["Value 1", "Value 2"]
  }
}

API get customfield is get fields with more options such as: lang, module or get with category from API get customfield

HTTP Request

GET /settings/customfields/DataSource

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
id String get api customfield with index idDropDown )

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of tickets

CURL sample

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/apisample' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "module": "tickets",
    "type": "create",
    "required": false
}'
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/apisample',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "module": "tickets",
    "type": "create",
    "required": false
 }'
  CURLOPT_HTTPHEADER => array(
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  module: 'tickets',
  type: 'create',
  required: false,
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/settings/customfields/field/apisample',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns CURL raw

API get sample data field is get data with options such as: module, type or required from API get customfield

HTTP Request

GET /settings/customfields/field/apisample

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
type String create or update
module String tickets accounts contacts leads
required String ⬜️ get fields required

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of tickets

Relationship

Get Objects

curl --location 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>?take=10&page=1' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>?take=10&page=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  take: 10,
  page: 1,
})

var config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>?take=10&page=1',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "total": 72024,
  "totalPage": 72024,
  "data": [
    {
      "_id": "6407f7610cf579eec70aaf72",
      "first_name": "Example Name",
      "last_name": "",
      "phone": "0342002040",
      "email": "",
      "companyname": "",
      "owner": "user_636dd401642d18c9b500f9b2",
      "sdtnharieng": "",
      "testaray": [],
      "thongtinkhac": {
        "salutation": "",
        "jobtitle": "",
        "gender": [],
        "department": "",
        "business_phone": "19001000",
        "business_email": "",
        "rating": "",
        "leadstatus": "",
        "reason": "",
        "leadsource": "",
        "product_interest": "",
        "annualrevenue": "",
        "business_type": "",
        "industry": "",
        "employees": "",
        "vatcode": "",
        "conversiondate": [],
        "description": "",
        "scorenumber": "",
        "tags": ""
      },
      "address": {
        "street": "",
        "zipcode": "",
        "country": "",
        "city": "",
        "district": "",
        "ward": ""
      },
      "assignto": "user_636dd401642d18c9b500f9b2",
      "assign_history": [
        "user_6335665f2eaf7a415f05eccc",
        "user_636dd401642d18c9b500f9b2"
      ],
      "first_namesearch": "example name",
      "created": {
        "byid": "6335665f2eaf7a415f05eccc",
        "buid": "636ca7a5e73061044303e183",
        "time": 1678243681,
        "options": []
      },
      "last_modified": {
        "byid": "636dd401642d18c9b500f9b2",
        "buid": "636ca7a5e73061044303e183",
        "time": 1678417621,
        "options": []
      },
      "mangxahoi": {
        "facebook": "",
        "twitter": "",
        "instagram": "",
        "linkedin": "",
        "youtube": "",
        "skypeid": "",
        "website": ""
      },
      "_collection": "C0001_leads",
      "created_username": "admin.C0001",
      "last_modified_username": "Admin (admin.C0001)",
      "tags_string": "",
      "owner_username": "Admin (admin.C0001)"
    }
  ]
}

Get all objects of module (account, contact, lead) with pagination by 2 query parameters (take and page)

HTTP Request

GET relationship/objects/<module>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Query Parameters

Key Type Required Description
take Number ⬜️ Number of tickets response (maximum is 100)
page Number ⬜️ Page response

Response Data

Key Type Description
status Boolean True or Fasle
msg String Message error when API failed
data Array Description of data

Read Objects

curl --location 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/read/<module>' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data '{
    "take" : 10,
    "page" : 1,
    "filter": {
        "logic" : "and",
        "filters" : [
            {
                "field": "last_modified.time",
                "operator": "gte",
                "value": 1688144400
            }
        ]
    },
    "sort": [
        {
            "field": "last_modified.time",
            "dir": "desc"
        }
    ]
}'
$curl = curl_init();
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/read/<module>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "take" : 10,
    "page" : 1,
    "filter": {
        "logic" : "and",
        "filters" : [
            {
                "field": "last_modified.time",
                "operator": "gte",
                "value": 1688144400
            }
        ]
    },
    "sort": [
        {
            "field": "last_modified.time",
            "dir": "desc"
        }
    ]
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: aTOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
const axios = require('axios')
let data = JSON.stringify({
  take: 10,
  page: 1,
  filter: {
    logic: 'and',
    filters: [
      {
        field: 'last_modified.time',
        operator: 'gte',
        value: 1688144400,
      },
    ],
  },
  sort: [
    {
      field: 'last_modified.time',
      dir: 'desc',
    },
  ],
})

let config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/read/<module>',
  headers: {
    'X-API-KEY': 'aTOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios
  .request(config)
  .then((response) => {
    console.log(JSON.stringify(response.data))
  })
  .catch((error) => {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "take": 1,
  "page": 1,
  "total": 1,
  "totalPage": 1,
  "data": [
    {
      "_id": "62973bd89c36f9070147a868",
      "gender": "Female",
      "first_name": "Test contact",
      "last_name": "",
      "salutation": "Ms.",
      "product_interest": "Devices",
      "owner": "user_62e897d1885e7a576003c165",
      "address": {
        "street": "136/12 Vườn chuối",
        "zipcode": "700000",
        "country": "Vietnam",
        "city": "Thành phố Hồ Chí Minh",
        "district": "Quận 3",
        "ward": "Phường 4"
      },
      "account": ["64b13d82a122f33b2671a1b9"],
      "phone": [""],
      "email": ["stel@southtelecom.vn"],
      "specialday": ["30/01/1995"],
      "mobi_phone": "",
      "main_email": "stel@southtelecom.vn",
      "first_namesearch": "test contact",
      "assignto": "user_62e897d1885e7a576003c165",
      "assign_history": [
        "user_62973aae7924987a31016992",
        "bu_636ca7a5e73061044303e183"
      ],
      "created": {
        "byid": "62973aae7924987a31016992",
        "buid": "6215da08aba7b40b19588da6",
        "time": 1654078424,
        "options": []
      },
      "last_modified": {
        "byid": "64531ed5c9adc2e9170036e2",
        "buid": "636ca7a5e73061044303e183",
        "time": 1689665127,
        "options": []
      },
      "ticket_requester_id": "62973bdf9e9d8c3b716abf93",
      "department": "",
      "facebook": "",
      "_collection": "C0384_contacts",
      "created_username": "CamTu (camtu.C0384)",
      "last_modified_username": "CamTu (camtu.C0384)",
      "tags_string": "",
      "thongtinkhac": {
        "tags": ""
      },
      "owner_username": "Nam Nguyễn (mkt.namnguyen.C0384)"
    }
  ]
}

API read objects is get objects with more options such as: sort, filter from API get view object

HTTP Request

POST /relationship/objects/read/

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
take Number ⬜️ Number of objects response (maximum is 100)
page Number ⬜️ Page response
sort Array ⬜️ Sort array with multiple objects. Field and dir (desc or asc)
filter Object ⬜️ Filter object multiple conditions

Response Data

Key Type Description
status Boolean Success or Failed
take Number Number of objects response
page Number Current page
totalPages Number Total pages
total Number Total objects
data Array Data of objects

Create object

curl --location 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data '{
    "basicinfo" : {
      "first_name": "Example Name",
      "last_name": "Example Last Name",
      "email": "Example Email",
      "phone": "0912345678",
      "account": "61cab7131d3c606e9c2268d3",
      "owner": "user_60f04042ef7372af76345c2b",
      "danhxung": "Mr."
    },
    "thongtinkhac": {
        "specialday": 1678357704,
        "salutation": "Mr.",
        "gender": "Male",
        "jobtitle": "Example",
        "department": "Example",
        "company": "Example",
        "workphone": "0912345678",
        "product_interest": "VAS Services",
        "contactsource": "Call",
        "relationshiptype": "Prospect",
        "contactstatus": "New",
        "idnumber": 123,
        "scorenumber": 123,
        "description": "Example",
        "tags": [
            "#tag1",
            "tag2"
        ],
        "dongia": 123,
        "chuso": 123
    },
    "address": [
        {
            "country": "",
            "city": "",
            "district": "",
            "ward": "",
            "street": "",
            "zipcode": ""
        }
    ],
    "mangxahoi": {
        "facebook": "Example",
        "twitter": "Example",
        "instagram": "Example",
        "linkedin": "Example",
        "youtube": "Example",
        "skypeid": "Example",
        "website": "Example"
    },
    "groupfieldother": {
        "socmndcccd": "Example",
        "hokhauthuongtru": "Example",
        "sotaikhoan": "Example",
        "nganhangdangky": "Example",
        "masothue": "Example",
        "tien2": 123
    }
}'
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "basicinfo" : {
      "first_name": "Example Name",
      "last_name": "Example Last Name",
      "email": "Example Email",
      "phone": "0912345678",
      "account": "61cab7131d3c606e9c2268d3",
      "owner": "user_60f04042ef7372af76345c2b",
      "danhxung": "Mr."
    },
    "thongtinkhac": {
        "specialday": 1678357704,
        "salutation": "Mr.",
        "gender": "Male",
        "jobtitle": "Example",
        "department": "Example",
        "company": "Example",
        "workphone": "0912345678",
        "product_interest": "VAS Services",
        "contactsource": "Call",
        "relationshiptype": "Prospect",
        "contactstatus": "New",
        "idnumber": 123,
        "scorenumber": 123,
        "description": "Example",
        "tags": [
            "#tag1",
            "tag2"
        ],
        "dongia": 123,
        "chuso": 123
    },
    "address": [
        {
            "country": "",
            "city": "",
            "district": "",
            "ward": "",
            "street": "",
            "zipcode": ""
        }
    ],
    "mangxahoi": {
        "facebook": "Example",
        "twitter": "Example",
        "instagram": "Example",
        "linkedin": "Example",
        "youtube": "Example",
        "skypeid": "Example",
        "website": "Example"
    },
    "groupfieldother": {
        "socmndcccd": "Example",
        "hokhauthuongtru": "Example",
        "sotaikhoan": "Example",
        "nganhangdangky": "Example",
        "masothue": "Example",
        "tien2": 123
    }
}',
  CURLOPT_HTTPHEADER => array(
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
  "basicinfo" : {
      "first_name": "Example Name",
      "last_name": "Example Last Name",
      "email": "Example Email",
      "phone": "0912345678",
      "account": "61cab7131d3c606e9c2268d3",
      "owner": "user_60f04042ef7372af76345c2b",
      "danhxung": "Mr."
    },
  "thongtinkhac": {
    "specialday": 1678357704,
    "salutation": "Mr.",
    "gender": "Male",
    "jobtitle": "Example",
    "department": "Example",
    "company": "Example",
    "workphone": "0912345678",
    "product_interest": "VAS Services",
    "contactsource": "Call",
    "relationshiptype": "Prospect",
    "contactstatus": "New",
    "idnumber": 123,
    "scorenumber": 123,
    "description": "Example",
    "tags": [
      "#tag1",
      "tag2"
    ],
    "dongia": 123,
    "chuso": 123
  },
  "address": [
    {
      "country": "",
      "city": "",
      "district": "",
      "ward": "",
      "street": "",
      "zipcode": ""
    }
  ],
  "mangxahoi": {
    "facebook": "Example",
    "twitter": "Example",
    "instagram": "Example",
    "linkedin": "Example",
    "youtube": "Example",
    "skypeid": "Example",
    "website": "Example"
  },
  "groupfieldother": {
    "socmndcccd": "Example",
    "hokhauthuongtru": "Example",
    "sotaikhoan": "Example",
    "nganhangdangky": "Example",
    "masothue": "Example",
    "tien2": 123
  }
});

var config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://pvcb-omni-api.worldfone.cloud/relationship/objects/<module>/',
  headers: { 
    'X-API-KEY': 'TOKEN_LOGIN_API', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:

{
    "status": true,
    "data": "640ae7d78eaa9514ed2ff6d2"
}

Create object

HTTP Request

POST relationship/objects/[module] module = [accounts,contacts,leads,....]

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body (If has data payload)

Key Type Required Description

Response Data

Key Type Description
status Boolean True or Fasle
msg String Message error when API failed
data Array Description of data
curl --location 'https://pvcb-omni-api.worldfone.cloud/services/omnichat/action/unlinkobject' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data '{
    "module": "contacts",
    "id": "63e32a4f8392da2bf1286576",
    "people_id": "63ec3e11bb3174b5cead484e",
    "room_id": "63ec3e130073973eb07148cd",
    "page_id": "63ad5254a33095790bc44320",
    "session_id": "63ec3f4a6dc77e2bea438beb"
}'
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/omnichat/action/unlinkobject',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "module": "contacts",
    "id": "63e32a4f8392da2bf1286576",
    "people_id": "63ec3e11bb3174b5cead484e",
    "room_id": "63ec3e130073973eb07148cd",
    "page_id": "63ad5254a33095790bc44320",
    "session_id": "63ec3f4a6dc77e2bea438beb"
}',
  CURLOPT_HTTPHEADER => array(
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios');
var data = JSON.stringify({
  "module": "contacts",
  "id": "63e32a4f8392da2bf1286576",
  "people_id": "63ec3e11bb3174b5cead484e",
  "room_id": "63ec3e130073973eb07148cd",
  "page_id": "63ad5254a33095790bc44320",
  "session_id": "63ec3f4a6dc77e2bea438beb"
});

var config = {
  method: 'post',
  maxBodyLength: Infinity,
  url: 'https://pvcb-omni-api.worldfone.cloud/services/omnichat/action/unlinkobject',
  headers: { 
    'X-API-KEY': 'TOKEN_LOGIN_API', 
    'Content-Type': 'application/json'
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});

The above command returns JSON structured like this:

{
    "status": true,
    "data":[]
}

Unlink object

HTTP Request

POST services/omnichat/action/unlinkobject

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body (If has data payload)

Key Type Required Description
module string accounts,contacts,leads
id string
people_id string
room_id string
page_id string
session_id string

Response Data

Key Type Description
status Boolean True or Fasle
msg String Message error when API failed
data Array Description of data

Tickets

Get category

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/category' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/category',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/category',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": [
    {
      "id": "61d69c9abbaac35c221424f2",
      "name": "Parent category",
      "created": {
        "id": "6110df60ef7372af76ce9eb8",
        "username": "admin.C0001",
        "name": "Worldfone4x Cloud",
        "time": 1641454746
      },
      "last_modified": {
        "id": "6110df60ef7372af76ce9eb8",
        "username": "admin.C0001",
        "name": "Worldfone4x Cloud",
        "time": 1647399180
      },
      "items": [
        {
          "id": "61d69cb614e27a2d99093845",
          "name": "Subcategory 1",
          "created": {
            "id": "61690935007df19d0e40ca1a",
            "username": "admin.C0001",
            "name": "Worldfone4x Cloud",
            "time": 1641454774
          },
          "last_modified": {
            "id": "61690935007df19d0e40ca1a",
            "username": "admin.C0001",
            "name": "Worldfone4x Cloud",
            "time": 1652692320
          }
        },
        {
          "id": "61d69cce7ed97d0c0c6e0f22",
          "name": "Subcategory 2",
          "created": {
            "id": "6110df60ef7372af76ce9eb8",
            "username": "admin.C0001",
            "name": "Worldfone4x Cloud",
            "time": 1641454798
          },
          "last_modified": {
            "id": "6110df60ef7372af76ce9eb8",
            "username": "admin.C0001",
            "name": "Worldfone4x Cloud",
            "time": 1652692330
          }
        }
      ]
    }
  ]
}

Get list categories of ticket (tree view 2 class) or get category by id

HTTP Request

GET /services/tickets/category/<id_category>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of category

Get views ticket

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/view' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/view',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/view',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": [
    {
      "key": "system_bookmarked",
      "name": "",
      "type": "system"
    },
    {
      "key": "system_mineticket",
      "name": "",
      "type": "system"
    },
    {
      "key": "system_ticketstatusnew",
      "name": "",
      "type": "system"
    },
    {
      "key": "system_ticketstatusend",
      "name": "",
      "type": "system"
    },
    {
      "key": "system_assigned2me",
      "name": "",
      "type": "system"
    },
    {
      "key": "6268eb9f1f60ca68e1596a14",
      "name": "Get view list ticket processing",
      "type": "custom"
    },
    {
      "key": "6268ebb729e2610e5737f6c4",
      "name": "List tickets assign my group",
      "type": "custom"
    },
    {
      "key": "6268f162146e3a71db799e28",
      "name": "List tickets of South Telecom",
      "type": "custom"
    }
  ]
}

Get list views ticket defined by user on web portal for filter (serve for API read ticket)

HTTP Request

GET /services/tickets/view

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of list view
data.\$.key String Key serve for API read ticket

Get tickets

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket?take=100&page=1' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket?take=100&page=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket?take=100&page=1',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
    "status": true,
    "take": 10,
    "page": 2,
    "totalPages": 3,
    "total": 22,
    "prevPage": "https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket?take=10&page=1",
    "nextPage": "https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket?take=10&page=3",
    "data": [
        {
          "basicinfo": {
            "requester": {
              "name": "4xCloud",
              "phone": [
                "1900545463"
              ],
              "email": [
                "contact@southtelecom.vn"
              ],
              "id": "6360ca2d0ed22f4a69068ca4"
            },
            "relatedaccount": {
              "name": "South Telecom JSC",
              "phone": "842836222789",
              "email": "contact@southtelecom.vn",
              "id": "63647dbc41a153ed3207cf02"
            },
            "priority": "normal",
            "category": {
              "id": "621f176bb6b1b56daf594632",
              "name": "Category API"
            },
            "parent_category": {
              "id": "621f176bb6b1b56daf594632",
              "name": "Category"
            },
            "assignee": {
              "id": "6360c1abbdbad519870bd618",
              "name": "John Due",
              "username": "john.C0001",
              "type": "user"
            },
            "tags": [],
            "duedate": "",
            "cc": [],
            "owner": {
              "id": "6360c1abbdbad519870bd618",
              "name": "John Due",
              "username": "john.C0001",
              "type": "user"
            },
            "ticket_id": "180963647fcb43180",
            "id": "63647fcbfc092a21cc0b3dc2",
            "status": "New",
            "source": "manual",
            "sourcedisplay": "manual",
            "subject": "Ticket Subject",
            "content": "<p>Ticket content</p>",
            "attachment": []
          },
          "custom_group_field_1": {
            "textfield": "Text Input",
            "textarea": "Text Area",
            "checkbox": [
              "1",
              "2"
            ],
            "phone": "1900545463",
            "combobox": "61f811da6a79850f63397d36",
            "url": "google.com",
            "money": "20",
            "percent": "5%"
          },
          "custom_group_field_2": {
            "dropdown_1": "value",
            "dropdown_2": "value_1"
          },
          "custom_group_field_3": {
            "datetime": 1667754000
          },
          "created": {
            "id": "6360c1abbdbad519870bd618",
            "username": "john.C0001",
            "name": "John Due",
            "time": 1667530699,
            "avatar": ""
          },
          "last_modified": {
            "id": "62a2f2ad491c582650570b72",
            "username": "member4xcloud.C0001",
            "name": "4xCloud Member",
            "time": 1667536093,
            "avatar": ""
          },
          "currentState": false
        }
        ...
    ]
}

Get all tickets with pagination by 2 query parameters (take and page)

HTTP Request

GET /services/tickets/ticket

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Required Description
take Number ⬜️ Number of tickets response (maximum is 100)
page Number ⬜️ Page response

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
take Number Number of tickets response
page Number Current page
totalPages Number Total pages
total Number Total tickets
prevPage String URL previous page
nextPage String URL next page
data Array Data of tickets

Get ticket by id

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/624d56321f6e7326151916f2' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/624d56321f6e7326151916f2',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/624d56321f6e7326151916f2',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "basicinfo": {
      "requester": {
        "name": "4xCloud",
        "phone": ["1900545463"],
        "email": ["contact@southtelecom.vn"],
        "id": "6360ca2d0ed22f4a69068ca4"
      },
      "relatedaccount": {
        "name": "South Telecom JSC",
        "phone": "842836222789",
        "email": "contact@southtelecom.vn",
        "id": "63647dbc41a153ed3207cf02"
      },
      "priority": "normal",
      "category": {
        "id": "621f176bb6b1b56daf594632",
        "name": "Category API"
      },
      "parent_category": {
        "id": "621f176bb6b1b56daf594632",
        "name": "Category"
      },
      "assignee": {
        "id": "6360c1abbdbad519870bd618",
        "name": "John Due",
        "username": "john.C0001",
        "type": "user"
      },
      "tags": [],
      "duedate": "",
      "cc": [],
      "owner": {
        "id": "6360c1abbdbad519870bd618",
        "name": "John Due",
        "username": "john.C0001",
        "type": "user"
      },
      "ticket_id": "180963647fcb43180",
      "id": "63647fcbfc092a21cc0b3dc2",
      "status": "New",
      "source": "manual",
      "sourcedisplay": "manual",
      "subject": "Ticket Subject",
      "content": "<p>Ticket content</p>",
      "attachment": []
    },
    "custom_group_field_1": {
      "textfield": "Text Input",
      "textarea": "Text Area",
      "checkbox": ["1", "2"],
      "phone": "1900545463",
      "combobox": "61f811da6a79850f63397d36",
      "url": "google.com",
      "money": "20",
      "percent": "5%"
    },
    "custom_group_field_2": {
      "dropdown_1": "value",
      "dropdown_2": "value_1"
    },
    "custom_group_field_3": {
      "datetime": 1667754000
    },
    "created": {
      "id": "6360c1abbdbad519870bd618",
      "username": "john.C0001",
      "name": "John Due",
      "time": 1667530699,
      "avatar": ""
    },
    "last_modified": {
      "id": "62a2f2ad491c582650570b72",
      "username": "member4xcloud.C0001",
      "name": "4xCloud Member",
      "time": 1667536093,
      "avatar": ""
    },
    "currentState": false
  }
}

Get ticket by id

HTTP Request

GET /services/tickets/ticket/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Object Ticket data

Read tickets

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/read' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "take": 15,
    "page": 1,
    "sort": [
        {
            "field": "created.time",
            "dir": "desc"
        }
    ],
    "filter": {
        "logic": "and",
        "filters": [
            {
                "field": "last_modified.time",
                "operator": "gte",
                "value": 1648746000
            },
            {
                "field": "last_modified.time",
                "operator": "lte",
                "value": 1651337999
            }
        ]
    },
    "keyview": "6268f162146e3a71db799e28"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/read',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "take": 15,
    "page": 1,
    "sort": [
        {
            "field": "created.time",
            "dir": "desc"
        }
    ],
    "filter": {
        "logic": "and",
        "filters": [
            {
                "field": "last_modified.time",
                "operator": "gte",
                "value": 1648746000
            },
            {
                "field": "last_modified.time",
                "operator": "lte",
                "value": 1651337999
            }
        ]
    },
    "keyview": "6268f162146e3a71db799e28"
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  take: 15,
  page: 1,
  sort: [
    {
      field: 'created.time',
      dir: 'desc',
    },
  ],
  filter: {
    logic: 'and',
    filters: [
      {
        field: 'last_modified.time',
        operator: 'gte',
        value: 1648746000,
      },
      {
        field: 'last_modified.time',
        operator: 'lte',
        value: 1651337999,
      },
    ],
  },
  keyview: '6268f162146e3a71db799e28',
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/read',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "take": 15,
  "page": 1,
  "totalPages": 1,
  "total": 1,
  "data": [
    {
      "basicinfo": {
        "requester": {
          "name": "4xCloud",
          "phone": ["1900545463"],
          "email": ["contact@southtelecom.vn"],
          "id": "6360ca2d0ed22f4a69068ca4"
        },
        "relatedaccount": {
          "name": "South Telecom JSC",
          "phone": "842836222789",
          "email": "contact@southtelecom.vn",
          "id": "63647dbc41a153ed3207cf02"
        },
        "priority": "normal",
        "category": {
          "id": "621f176bb6b1b56daf594632",
          "name": "Category API"
        },
        "parent_category": {
          "id": "621f176bb6b1b56daf594632",
          "name": "Category"
        },
        "assignee": {
          "id": "6360c1abbdbad519870bd618",
          "name": "John Due",
          "username": "john.C0001",
          "type": "user"
        },
        "tags": [],
        "duedate": "",
        "cc": [],
        "owner": {
          "id": "6360c1abbdbad519870bd618",
          "name": "John Due",
          "username": "john.C0001",
          "type": "user"
        },
        "ticket_id": "180963647fcb43180",
        "id": "63647fcbfc092a21cc0b3dc2",
        "status": "New",
        "source": "manual",
        "sourcedisplay": "manual",
        "subject": "Ticket Subject",
        "content": "<p>Ticket content</p>",
        "attachment": []
      },
      "custom_group_field_1": {
        "textfield": "Text Input",
        "textarea": "Text Area",
        "checkbox": ["1", "2"],
        "phone": "1900545463",
        "combobox": "61f811da6a79850f63397d36",
        "url": "google.com",
        "money": "20",
        "percent": "5%"
      },
      "custom_group_field_2": {
        "dropdown_1": "value",
        "dropdown_2": "value_1"
      },
      "custom_group_field_3": {
        "datetime": 1667754000
      },
      "created": {
        "id": "6360c1abbdbad519870bd618",
        "username": "john.C0001",
        "name": "John Due",
        "time": 1667530699,
        "avatar": ""
      },
      "last_modified": {
        "id": "62a2f2ad491c582650570b72",
        "username": "member4xcloud.C0001",
        "name": "4xCloud Member",
        "time": 1667536093,
        "avatar": ""
      },
      "currentState": false
    }
  ]
}

API read tickets is get tickets with more options such as: sort, filter or get with keyview from API get view ticket

HTTP Request

POST /services/tickets/ticket/read

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
take Number ⬜️ Number of tickets response (maximum is 100)
page Number ⬜️ Page response
sort Array ⬜️ Sort array with multiple objects. Field and dir (desc or asc)
filter Object ⬜️ Filter object multiple conditions
keyview String ⬜️ Key from API get views ticket

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
take Number Number of tickets response
page Number Current page
totalPages Number Total pages
total Number Total tickets
prevPage String URL previous page
nextPage String URL next page
data Array Data of tickets

Create ticket

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloudservices/tickets/ticket' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'basicinfo[requester]="62a9b3faa129f66b4b3fbae4"' \
--form 'basicinfo[account_related]="62c4f9fc812b99e9960d1aca"' \
--form 'basicinfo[subject]="Subject Ticket"' \
--form 'basicinfo[content]="Content"' \
--form 'basicinfo[category]="621f176bb6b1b56daf594632"' \
--form 'basicinfo[assignee]="user_627b6be2494061156f798eb4"' \
--form 'basicinfo[sourcedisplay]="call"' \
--form 'basicinfo[priority]="normal"' \
--form 'basicinfo[ccs][]="bu_61ea514ddc4883646320f24f"' \
--form 'basicinfo[ccs][]="user_627b6a7ecc82dc1c2104a7c2"' \
--form 'basicinfo[duedate]="1667157924"' \
--form 'basicinfo[tags][]="#tag1"' \
--form 'basicinfo[tags][]="tag2"' \
--form 'basicinfo[files][]=@"/path/to/file"' \
--form 'custom_group_field_1[textfield]="TEXT"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => [
    'basicinfo[requester]' => '62a9b3faa129f66b4b3fbae4',
    'basicinfo[account_related]' => '62c4f9fc812b99e9960d1aca',
    'basicinfo[subject]' => 'Subject Ticket',
    'basicinfo[content]' => 'Content',
    'basicinfo[category]' => '621f176bb6b1b56daf594632',
    'basicinfo[assignee]' => 'user_627b6be2494061156f798eb4',
    'basicinfo[sourcedisplay]' => 'call',
    'basicinfo[priority]' => 'normal',
    'basicinfo[ccs][]' => 'bu_61ea514ddc4883646320f24f',
    'basicinfo[ccs][]' => 'user_627b6a7ecc82dc1c2104a7c2',
    'basicinfo[duedate]' => '1667157924',
    'basicinfo[tags][]' => '#tag1',
    'basicinfo[tags][]' => 'tag2',
    'basicinfo[files][]' => new CURLFILE('/path/to/file'),
    'custom_group_field_1[textfield]' => 'TEXT',
  ],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('basicinfo[requester]', '617a0db45cfb5c149b279fa6')
data.append('basicinfo[account_related]', '61cab7131d3c606e9c2268d3')
data.append('basicinfo[subject]', 'Subject Ticket')
data.append('basicinfo[content]', 'Content')
data.append('basicinfo[category]', '621f176bb6b1b56daf594632')
data.append('basicinfo[assignee]', 'user_627b6be2494061156f798eb4')
data.append('basicinfo[sourcedisplay]', 'call')
data.append('basicinfo[priority]', 'normal')
data.append('basicinfo[ccs][]', 'bu_61ea514ddc4883646320f24f')
data.append('basicinfo[ccs][]', 'user_627b6a7ecc82dc1c2104a7c2')
data.append('basicinfo[duedate]', '1667157924')
data.append('basicinfo[tags][]', '#tag1')
data.append('basicinfo[tags][]', 'tag2')
data.append('basicinfo[files][]', fs.createReadStream('/path/to/file'))
data.append('custom_group_field_1[textfield]', 'TEXT')

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "id": "62fa21088b11cb67fa14266a"
}

Create ticket

HTTP Request

POST /services/tickets/ticket

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Description
group['fieldname'] Data of field basicinfo['content']

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
id String ID of ticket

Update ticket

curl --location --request PUT 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/62fb08237f384bae6d07f022' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'basicinfo[requester]="62a9b3faa129f66b4b3fbae4"' \
--form 'basicinfo[account_related]="62c4f9fc812b99e9960d1aca"' \
--form 'basicinfo[subject]="Change Subject Ticket"' \
--form 'basicinfo[content]="Change Content"' \
--form 'basicinfo[category]="621f176bb6b1b56daf594632"' \
--form 'basicinfo[assignee]="user_627b6be2494061156f798eb4"' \
--form 'basicinfo[sourcedisplay]="call"' \
--form 'basicinfo[priority]="high"' \
--form 'basicinfo[ccs][]="bu_61ea514ddc4883646320f24f"' \
--form 'basicinfo[ccs][]="user_627b6a7ecc82dc1c2104a7c2"' \
--form 'basicinfo[duedate]="1667157924"' \
--form 'basicinfo[tags][]="#tag1"' \
--form 'basicinfo[tags][]="tag2"' \
--form 'basicinfo[deletefileindex]="0, 1"' \
--form 'basicinfo[files][]=@"/path/to/file"' \
--form 'custom_group_field_1[textfield]="TEXT"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/62fb08237f384bae6d07f022',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => [
    'basicinfo[requester]' => '62a9b3faa129f66b4b3fbae4',
    'basicinfo[account_related]' => '62c4f9fc812b99e9960d1aca',
    'basicinfo[subject]' => 'Change Subject Ticket',
    'basicinfo[content]' => 'Change Content',
    'basicinfo[category]' => '621f176bb6b1b56daf594632',
    'basicinfo[assignee]' => 'user_627b6be2494061156f798eb4',
    'basicinfo[sourcedisplay]' => 'call',
    'basicinfo[priority]' => 'normal',
    'basicinfo[ccs][]' => 'bu_61ea514ddc4883646320f24f',
    'basicinfo[ccs][]' => 'user_627b6a7ecc82dc1c2104a7c2',
    'basicinfo[duedate]' => '1667157924',
    'basicinfo[tags][]' => '#tag1',
    'basicinfo[tags][]' => 'tag2',
    'basicinfo[deletefileindex]' => '0, 1',
    'basicinfo[files][]' => new CURLFILE('/path/to/file'),
    'custom_group_field_1[textfield]' => 'TEXT',
  ],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('basicinfo[requester]', '617a0db45cfb5c149b279fa6')
data.append('basicinfo[account_related]', '61cab7131d3c606e9c2268d3')
data.append('basicinfo[subject]', 'Subject Ticket')
data.append('basicinfo[content]', 'Content')
data.append('basicinfo[category]', '621f176bb6b1b56daf594632')
data.append('basicinfo[assignee]', 'user_627b6be2494061156f798eb4')
data.append('basicinfo[sourcedisplay]', 'call')
data.append('basicinfo[priority]', 'normal')
data.append('basicinfo[ccs][]', 'bu_61ea514ddc4883646320f24f')
data.append('basicinfo[ccs][]', 'user_627b6a7ecc82dc1c2104a7c2')
data.append('basicinfo[duedate]', '1667157924')
data.append('basicinfo[tags][]', '#tag1')
data.append('basicinfo[tags][]', 'tag2')
data.append('basicinfo[deletefileindex]', '0, 1')
data.append('basicinfo[files][]', fs.createReadStream('/path/to/file'))
data.append('custom_group_field_1[textfield]', 'TEXT')

var config = {
  method: 'put',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/ticket/62fb08237f384bae6d07f022',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Update ticket

HTTP Request

PUT /services/tickets/ticket/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Description
group['fieldname'] Data of field basicinfo['content']

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Get log

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/log/62cd3c8f6d95a586080e5342' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/log/62cd3c8f6d95a586080e5342',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/log/62cd3c8f6d95a586080e5342',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
    "status": true,
    "take": 10,
    "page": 1,
    "totalPages": 5,
    "total": 45,
    "nextPage": "https://pvcb-omni-api.worldfone.cloud/services/tickets/log?take=10&page=2",
    "data": [
        {
            "_id": "62f9ac67ac43cc7b9f4f19e2",
            "ticket_id": "62cd3c8f6d95a586080e5342",
            "comment_id": "62f690d5b378194b095210ff",
            "type": "deletecommentnote",
            "comment": {
                "_id": "62f690d5b378194b095210ff",
                "ticket_id": "62cd3c8f6d95a586080e5342",
                "content": "<p>Content sub</p>\n",
                "type": "note",
                "notetype": "public",
                "replycomments": 0,
                "tagusers": [],
                "raw_content": "Content sub\n",
                "raw_content4search": "content sub",
                "upload_data": [
                    {
                        "nameReal": "ggext.txt",
                        "nameCDN": "ggext.txt",
                        "extension": "txt",
                        "filesize": 1000
                    },
                    {
                        "nameReal": "note_plan.txt",
                        "nameCDN": "note-plan.txt",
                        "extension": "txt",
                        "filesize": 1000
                    }
                ],
                "created": {
                    "byid": "60f04042ef7372af76345c2b",
                    "time": 1660326101,
                    "options": [],
                    "owner": true
                },
                "last_modified": {
                    "byid": "60f04042ef7372af76345c2b",
                    "time": 1660326101,
                    "options": [],
                    "owner": true
                }
            },
            "created": {
                "byid": "60f04042ef7372af76345c2b",
                "time": 1660529767,
                "username": "admin.C0001",
                "name": "Worldfone4x Cloud"
            }
        },
        ...
    ]
}

Get log of ticket

HTTP Request

GET /services/tickets/log/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Description
take Number Number of tickets response
page Number Current page

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
take Number Number of tickets response
page Number Current page
totalPages Number Total pages
total Number Total tickets
prevPage String URL previous page
nextPage String URL next page
data Array Data of tickets

Get list requesters

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/getlist' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/getlist',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/getlist',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": [
    {
      "id": "6168e47bbae4e771a01c5b93",
      "name": "South Telecom Contact",
      "phone": "0909111222",
      "email": "stcontact@gmail.com",
      "frommodule": "contacts",
      "idmodule": "6166a96f2af0cd327c2aaa26",
      "tickets": 0,
      "created": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1634264187
      },
      "namecustom": "South Telecom Contact - 0909111222 - stcontact@gmail.com"
    },
    {
      "id": "61bab7f2da176b497a6d7c2d",
      "name": "Requester",
      "phone": "0388811122",
      "email": "",
      "frommodule": "contacts",
      "idmodule": "61a89e93ef20445608402680",
      "tickets": 0,
      "created": {
        "byid": "61690935007df19d0e40ca1a",
        "time": 1639626738,
        "options": [],
        "owner": true
      },
      "namecustom": "Requester - 0388811122"
    }
  ]
}

Get list requesters, who request tickets before

HTTP Request

GET /services/tickets/requester/getlist

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Description
value String Find contains name, phone, email
idrequester String Find by id requester

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of requesters

Search requesters

curl --location -g --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/search?modules[]=contacts&modules[]=leads&phone=083&email&take=20&page=1&modules[]=users' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/search?modules[]=contacts&modules[]=leads&phone=083&email&take=20&page=1&modules[]=users',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url:
    'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/search?modules[]=contacts&modules[]=leads&phone=083&email&take=20&page=1&modules[]=users',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "take": 5,
  "page": 1,
  "totalPages": 3,
  "total": 14,
  "data": [
    {
      "module": "contacts",
      "name": "Contact 1",
      "phone": "0909111222",
      "email": "",
      "id": "621b9368b798e1568b6f3ee6"
    },
    {
      "module": "leads",
      "name": "Miss Nhu",
      "phone": "0981222111",
      "email": "nhu8x@gmail.com",
      "id": "62133742c234ac41e9169ea6"
    },
    {
      "ticket_requester_id": "621bc274523dc71855390936",
      "module": "contacts",
      "name": "Mr Tam",
      "phone": "0837305730",
      "email": "",
      "id": "621bc274523dc71855390934"
    }
  ]
}

API will response list data from Contacts, Leads, Users
After response, use API convert requester to convert data (Contacts, Leads, Users) to Requester Ticket

HTTP Request

GET /services/tickets/requester/search

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Description
modules Array contacts, leads, users
name String Find name contains
phone String Find phone contains
email String Find email contains
take Number Number of tickets response (maximum is 100)
page Number Page response

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
take Number Number of tickets response
page Number Current page
totalPages Number Total pages
total Number Total tickets
prevPage String URL previous page
nextPage String URL next page
data Array Data of tickets

Convert requester

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/convert' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "module":"contacts",
    "id":"621c126a19284e75485f9d42"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/convert',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "module":"contacts",
    "id":"621c126a19284e75485f9d42"
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  module: 'contacts',
  id: '621c126a19284e75485f9d42',
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/convert',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "name": "Leads 1",
    "phone": "0987666555",
    "email": "",
    "frommodule": "leads",
    "idmodule": "621c126a19284e75485f9d42",
    "id": "624179ef4d50fb454c77dcb4"
  }
}

API will response a requester convert from contacts, leads, users.
You can get id of requester

HTTP Request

POST /services/tickets/requester/convert

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Description
module String contacts, leads, users
id String Id of data (contacts, leads, users)

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Object Data of requester

Add requester by module

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/addbymodule' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name" : "Name add requester",
    "type" : "contacts"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/addbymodule',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "name" : "Name add requester",
    "type" : "contacts"
}',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  name: 'Name add requester',
  type: 'contacts',
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/requester/addbymodule',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "name": "Name add requester",
    "phone": "",
    "email": "",
    "tickets": 0,
    "created": {
      "byid": "61690935007df19d0e40ca1a",
      "time": 1651139193,
      "options": [],
      "owner": true
    },
    "last_modified": {
      "byid": "61690935007df19d0e40ca1a",
      "time": 1651139193,
      "options": [],
      "owner": true
    },
    "id": "626a6279293e98776c328fea",
    "type": "contacts"
  }
}

Add requester by module

HTTP Request

POST /services/tickets/requester/addbymodule

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Description
name String Name of requester
type String contacts or leads

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Object Data of requester

Get actions

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/62cd3c8f6d95a586080e5342' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/62cd3c8f6d95a586080e5342',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/62cd3c8f6d95a586080e5342',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": [
    {
      "name": "In Progress",
      "token": "DefaultFlow_InProgress",
      "extendConfig": {
        "status": "In Progress",
        "typeColor": "default",
        "backgroundColor": "#f7be64",
        "textColor": "#ffffff"
      },
      "stepactiontoken": "ce0580eb6850229f2fa2525e85b95da4"
    },
    {
      "name": "Cancel",
      "token": "DefaultFlow_Cancel",
      "extendConfig": {
        "status": "Cancel",
        "typeColor": "default",
        "backgroundColor": "#ef8a80",
        "textColor": "#ffffff"
      },
      "stepactiontoken": "ce0580eb6850229f2fa2525e85b95da4"
    }
  ]
}

API response list current actions in state of ticket BPM

HTTP Request

GET /services/tickets/action/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Data of actions

Doing action

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/doing/62cd3c8f6d95a586080e5342' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'token="DefaultFlow_InProgress"' \
--form 'stepactiontoken="aedc3cdd517d1e797f2bf0d0984e0f53"' \
--form 'comment_content="Comment when action In Progress"' \
--form 'comment_type="public"' \
--form 'assignee="bu_61d45ac06a31026117215716"' \
--form 'files[]=@"/path/to/file"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/doing/62cd3c8f6d95a586080e5342',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => [
    'token' => 'DefaultFlow_InProgress',
    'stepactiontoken' => 'aedc3cdd517d1e797f2bf0d0984e0f53',
    'comment_content' => 'Comment when action In Progress',
    'comment_type' => 'public',
    'assignee' => 'bu_61d45ac06a31026117215716',
    'files[]' => new CURLFILE('/path/to/file'),
  ],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('token', 'DefaultFlow_InProgress')
data.append('stepactiontoken', 'aedc3cdd517d1e797f2bf0d0984e0f53')
data.append('comment_content', 'Comment when action In Progress')
data.append('comment_type', 'public')
data.append('assignee', 'bu_61d45ac06a31026117215716')
data.append('files[]', fs.createReadStream('/path/to/file'))

var config = {
  method: 'post',
  url:
    'https://pvcb-omni-api.worldfone.cloud/services/tickets/action/doing/62cd3c8f6d95a586080e5342',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "comment": {
      "ticket_id": "62cd3c8f6d95a586080e5342",
      "content": "<p>Comment when action In Progress</p>\n",
      "type": "note",
      "notetype": "public",
      "replycomments": 0,
      "last_modified": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1660301664,
        "options": [],
        "owner": true
      },
      "created": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1660301664,
        "options": [],
        "owner": true,
        "avatar": "DOMAIN_AVATAR"
      },
      "timetext": "justnow. Friday, 12 August 05:54 PM",
      "id": "62f63160df5ad7060e7d1b02",
      "usersubmit_info": {
        "username": "admin.C0001",
        "owner": true,
        "extension": "8001",
        "email": "",
        "name": "Worldfone4x Cloud",
        "phone": "",
        "last_modified": {
          "byid": "60f04042ef7372af76345c2b",
          "time": 1649231706,
          "options": [],
          "owner": true
        },
        "ticket_requester_id": "621d9820f5cd5c6b9c06ac86",
        "ticket_submitter_id": "626b9dda8b56a14a8671b895"
      }
    },
    "usersubmit_info": {
      "username": "admin.C0001",
      "owner": true,
      "extension": "8001",
      "email": "",
      "name": "Worldfone4x Cloud",
      "phone": "",
      "last_modified": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1649231706,
        "options": [],
        "owner": true
      },
      "ticket_requester_id": "621d9820f5cd5c6b9c06ac86",
      "ticket_submitter_id": "626b9dda8b56a14a8671b895"
    }
  }
}

Action ticket state BPM by token

HTTP Request

POST /services/tickets/action/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
token String Token of action
stepactiontoken String State token of action
comment_content String Content of comment on action
comment_type String Type of comment: public or private
assignee String Value of API get user permission
files[] File Files on comment

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Object Comment, User submit

Get comments

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342?take=10&page=1' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342?take=10&page=1',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url:
    'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342?take=10&page=1',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
    "status": true,
    "take": 10,
    "page": 1,
    "totalPages": 2,
    "total": 11,
    "nextPage": "https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342?take=10&page=2",
    "data": [
        {
            "ticket_id": "62cd3c8f6d95a586080e5342",
            "content": "<p>Content sub</p>\n",
            "type": "note",
            "notetype": "public",
            "replycomments": 0,
            "created": {
                "byid": "60f04042ef7372af76345c2b",
                "time": 1660318132,
                "options": [],
                "owner": true,
                "avatar": "DOMAIN_AVATAR"
            },
            "last_modified": {
                "byid": "60f04042ef7372af76345c2b",
                "time": 1660318132,
                "options": [],
                "owner": true
            },
            "timetext": "4 minutes ago. Friday, 12 August 10:28 PM",
            "usersubmit_info": {
                "username": "admin.C0001",
                "owner": true,
                "extension": "8001",
                "email": "",
                "name": "Worldfone4x Cloud",
                "phone": "",
                "last_modified": {
                    "byid": "60f04042ef7372af76345c2b",
                    "time": 1649231706,
                    "options": [],
                    "owner": true
                },
                "ticket_requester_id": "621d9820f5cd5c6b9c06ac86",
                "ticket_submitter_id": "626b9dda8b56a14a8671b895",
                "status": true
            },
            "id": "62f671b426adab555568a389"
        },
        ...
    ]
}

Get list comments of ticket id with pagination

HTTP Request

GET /services/tickets/comment/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Description
take Number Number of tickets response (maximum is 100)
page Number Page response

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
take Number Number of tickets response
page Number Current page
totalPages Number Total pages
total Number Total tickets
prevPage String URL previous page
nextPage String URL next page
data Array Data of tickets

Create comment

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--form 'content="Content"' \
--form 'notetype="private"' \
--form 'files[]=@"/path/to/file"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => [
    'content' => 'Content',
    'notetype' => 'private',
    'files[]' => new CURLFILE('/path/to/file'),
  ],
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('content', 'Content')
data.append('notetype', 'private')
data.append('files[]', fs.createReadStream('/path/to/file'))

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "ticket_id": "62cd3c8f6d95a586080e5342",
    "content": "<p>Content</p>\n",
    "type": "note",
    "notetype": "private",
    "replycomments": 0,
    "tagusers": [],
    "raw_content": "Content\n",
    "last_modified": {
      "byid": "60f04042ef7372af76345c2b",
      "time": 1660318132,
      "options": [],
      "owner": true
    },
    "created": {
      "byid": "60f04042ef7372af76345c2b",
      "time": 1660318132,
      "options": [],
      "owner": true,
      "avatar": "DOMAIN_AVATAR"
    },
    "timetext": "justnow. Friday, 12 August 10:28 PM",
    "ccs_updated": [],
    "id": "62f671b426adab555568a389",
    "usersubmit_info": {
      "username": "admin.C0001",
      "owner": true,
      "extension": "8001",
      "email": "",
      "name": "Worldfone4x Cloud",
      "phone": "",
      "last_modified": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1649231706,
        "options": [],
        "owner": true
      },
      "ticket_requester_id": "621d9820f5cd5c6b9c06ac86",
      "ticket_submitter_id": "626b9dda8b56a14a8671b895"
    }
  }
}

Create comment of ticket

HTTP Request

POST /services/tickets/comment/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
notetype String Type of comment: public or private
content String Content of comment
parentcomment String ID of parent comment
files[] File Files on comment

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Object Data of comment

Update comment

curl --location --request PUT 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'content="Content update"' \
--form 'notetype="public"' \
--form 'idcomment="62f69192e2a80f35bd5a9b90"' \
--form 'deletefileindex="0,1"' \
--form 'files[]=@"/path/to/file"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'PUT',
  CURLOPT_POSTFIELDS => [
    'content' => 'Content update',
    'notetype' => 'public',
    'idcomment' => '62f69192e2a80f35bd5a9b90',
    'deletefileindex' => '0,1',
    'files[]' => new CURLFILE('/path/to/file'),
  ],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('content', 'Content update')
data.append('notetype', 'public')
data.append('idcomment', '62f69192e2a80f35bd5a9b90')
data.append('deletefileindex', '0,1')
data.append('files[]', fs.createReadStream('/path/to/file'))

var config = {
  method: 'put',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": {
    "last_modified": {
      "byid": "60f04042ef7372af76345c2b",
      "time": 1660326501,
      "options": [],
      "owner": true
    },
    "content": "<p>Content update</p>\n",
    "notetype": "public",
    "upload_data": [
      {
        "extension": "txt",
        "path": "DOMAIN_FILE",
        "filesize": 1113,
        "name": "FILENAME"
      }
    ],
    "ccs_updated": [],
    "usersubmit_info": {
      "username": "admin.C0001",
      "owner": true,
      "extension": "8001",
      "email": "",
      "name": "Worldfone4x Cloud",
      "phone": "",
      "last_modified": {
        "byid": "60f04042ef7372af76345c2b",
        "time": 1649231706,
        "options": [],
        "owner": true
      },
      "ticket_requester_id": "621d9820f5cd5c6b9c06ac86",
      "ticket_submitter_id": "626b9dda8b56a14a8671b895",
      "status": true
    }
  }
}

Update comment

HTTP Request

PUT /services/tickets/comment/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Description
idcomment String ID comment
content String Content of comment
notetype String public or private
deletefileindex String Index of files delete
files File Files on comment

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Delete comment

curl --location --request DELETE 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342/62f690d5b378194b095210ff' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342/62f690d5b378194b095210ff',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'delete',
  url:
    'https://pvcb-omni-api.worldfone.cloud/services/tickets/comment/62cd3c8f6d95a586080e5342/62f690d5b378194b095210ff',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Delete comment

HTTP Request

DELETE /services/tickets/comment/<id_ticket>/<id_comment>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Read files

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/read/6304a1f7e9e86adbb00ddd02' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "take": 5,
    "page": 1
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/read/6304a1f7e9e86adbb00ddd02',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "take": 5,
    "page": 1
  }',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  take: 5,
  page: 1,
})

var config = {
  method: 'post',
  url:
    'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/read/6304a1f7e9e86adbb00ddd02',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "take": 5,
  "page": 1,
  "total": 0,
  "totalPages": 0,
  "data": []
}

Get list files in ticket

HTTP Request

POST /services/tickets/files/read/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Required Description
take Number ⬜️ Number of tags response
page Number ⬜️ Current page
sort String ⬜️ desc or asc
namefile String ⬜️ Name of file
startdate Timestamp ⬜️ Created time start
enddate Timestamp ⬜️ Created time end

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array Description of data

Add files

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--form 'files[]=@"photo_2022-07-29_15-46-07.jpg"'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => [
    'files[]' => new CURLFILE('photo_2022-07-29_15-46-07.jpg'),
  ],
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var FormData = require('form-data')
var fs = require('fs')
var data = new FormData()
data.append('files[]', fs.createReadStream('photo_2022-07-29_15-46-07.jpg'))

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    ...data.getHeaders(),
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Add files to ticket manual

HTTP Request

POST /services/tickets/files/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
files array list file of tickets

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Remove files

curl --location --request DELETE 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json' \
--data-raw '{
    "file_id": "6304b05af3329f689f54ebb6"
}'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'DELETE',
  CURLOPT_POSTFIELDS => '{
    "file_id": "6304b05af3329f689f54ebb6"
 }',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  file_id: '6304b05af3329f689f54ebb6',
})

var config = {
  method: 'delete',
  url: 'https://pvcb-omni-api.worldfone.cloud/services/tickets/files/6304a1f7e9e86adbb00ddd02',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true
}

Delete files by id

HTTP Request

DELETE /services/tickets/files/<id_ticket>

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API

Request Body

Key Type Required Description
file_id array List id file of tickets

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed

Tags

Get tags

curl --location --request GET 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags' \
--header 'X-API-KEY: TOKEN_LOGIN_API'
$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => ['X-API-KEY: TOKEN_LOGIN_API'],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')

var config = {
  method: 'get',
  url: 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
  },
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "data": []
}

Get list tags or get tag by id

HTTP Request

GET /settings/generalconfig/tags

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Query Parameters

Key Type Required Description
module String ⬜️ Alias of module
take Number ⬜️ Number of tags response
page Number ⬜️ Current page

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array List tags

Read tags

curl --location --request POST 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags/read' \
--header 'X-API-KEY: TOKEN_LOGIN_API' \
--header 'Content-Type: application/json'
curl_setopt_array($curl, [
  CURLOPT_URL => 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags/read',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS => '{
    "take": 5,
    "page": 1,
    "sort": {
        "field": "last_modified.time",
        "dir": "desc"
    },
    "startdate": 1643241600,
    "enddate": 1658908044,
    "searchtext": ""
  }',
  CURLOPT_HTTPHEADER => [
    'X-API-KEY: TOKEN_LOGIN_API',
    'Content-Type: application/json',
  ],
]);

$response = curl_exec($curl);

curl_close($curl);
echo $response;
var axios = require('axios')
var data = JSON.stringify({
  take: 5,
  page: 1,
  sort: {
    field: 'last_modified.time',
    dir: 'desc',
  },
  startdate: 1643241600,
  enddate: 1658908044,
  searchtext: '',
})

var config = {
  method: 'post',
  url: 'https://pvcb-omni-api.worldfone.cloud/settings/generalconfig/tags/read',
  headers: {
    'X-API-KEY': 'TOKEN_LOGIN_API',
    'Content-Type': 'application/json',
  },
  data: data,
}

axios(config)
  .then(function (response) {
    console.log(JSON.stringify(response.data))
  })
  .catch(function (error) {
    console.log(error)
  })

The above command returns JSON structured like this:

{
  "status": true,
  "take": 5,
  "page": 1,
  "total": 0,
  "totalPages": 0,
  "data": []
}

Get list tags with filter

HTTP Request

POST /settings/generalconfig/tags/read

Request Headers

Key Value
Content-Type application/json
X-API-KEY TOKEN_LOGIN_API or SECRET_KEY

Request Body

Key Type Required Description
take Number ⬜️ Number of tags response
page Number ⬜️ Current page
sort array ⬜️ sort of tags
startdate timestamp ⬜️ The start date of tags
enddate timestamp ⬜️ The end date of tags
searchtext timestamp ⬜️ Search string tags

Response Data

Key Type Description
status Boolean Success or Failed
error String Message error when API failed
data Array List tags

HTTP Code

The OmniCXM API uses the following http codes:

HTTP Code Meaning
200 OK -- API response OK
201 Created -- Request OK but API is not already success
202 Accepted -- Request OK but API limited
304 Not Modified
400 Bad Request -- Your request sucks
401 Unauthorized -- Your API key is wrong
403 Forbidden -- Maybe permission is not open
404 Not Found -- The specified could not be found
405 Method Not Allowed -- You tried to access api with an invalid method
406 Not Acceptable -- You requested a format that isn't json
500 Internal Server Error -- We had a problem with our server. Try again later.
502 Bad Gateway -- We had a problem with our server. Try again later.
503 Service Unavailable -- We're temporarially offline for maintanance. Please try again later.