Chatwhizz Live Chat External API

BaseUrl: /
Token key in Request header: api_token
Get Organisation Info API
Request Type GET
Request URL baseURL + auth/organisation
Expected Output:
{
      "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
      "message" : {  // organisation data 
          "status": 1 => Active, 0 => Blocked by sa , 2 => Incomplete Payment 
          "dummyDomain": true => Dummy account, false => Live account 
          "name": Organisation name 
          "email": Organisation email 
          "access": [{ // access type either 'admin' or 'staff'
              "role": admin => have all access, staff => access using by permission array 
              "status": 0 => blocked, 1 => active (Only applicable for staff account)
              "permission": permission array using by staff role 
              "name":  name of the account 
              "email": email of the account 
          }],
          "plan": [{
              "name": Plan name 
              "price": plan price 
              "features": plan features 
              "subscriptionID": paypal subsciption id
          }],
          "addon": [{
              "name": addon name 
              "uniqueName": addon unique name 
              "subscriptionID": paypal subscription id 
              "status": 1 => active, 2 => inactive 
              "plan": addon plan installed by organisation 
              "uvdeskConfig": uvdesk config (only use in uvdesk addon)
              "schedulerConfig": scheduler config (only use in scheduler addon),
              "accessToken": (only use in seller buyer addon)
              "refreshToken": (only use in seller buyer addon)
          }]   
      }
} 
Create Operator API
Request TypePOST
Request URLbaseUrl + auth/addon/live_chat/operator/add
Required Fields (In body parameter) :
emailemail of operator
namename of operator
Expected Output :
{
      "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
      "message": {
          "name": name of operator
          "email": email of operator 
      }
}
Get Operator Info API
Request TypeGET
Request URLbaseUrl + auth/addon/live_chat/operator/get
Required Field (In query parameter)
email email of operator
Expected Output:
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
     "message": {
          "name": name of operator
          "email": email of operator
          "status": status of operator // 0 => offline 1=> online 3=> busy 2=> away
          "active": 1 => user able to login 0=> unable to login
          "operator": true => operator, false => not a operator 
          "addOns": [{ // live chat addon 
              "status": 1 => active in addon 0 => Inactive in addon
          }]
      }
} 
Get Operator List API
Request TypeGET
Request URLbaseUrl + auth/addon/live_chat/operator/list
Expected Output:
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
     "message": [
           {
              "name": { // name  of operator
                  "lastName": last name of operator,
                  "firstName": first name of operator
              },
              "email": email of operator
              "status": status of operator // 0 => offline 1=> online 3=> busy 2=> away
              "active": 1 => user able to login 0=> unable to login
              "operator": true => operator, false => not a operator 
              "addOns": [{ // live chat addon 
                  "status": 1 => active in addon 0 => Inactive in addon
              }]
          },
          {},{},......
      ]
} 
Update Operator API (used to update the status of operator at live chat addon)
Request TypePUT
Request URLbaseUrl + auth/addon/live_chat/operator/update
Required Fields (In body parameter) :
email email of operator
Updated Fields (This field is mandatory for update) :
statusaccepted value 0 or 1 // (1=> active or 0=> inactive only for the live chat addon)
Optional Fields //(only used in case of status value is 1)
domain [test.com, webkul.com] // use in this specific format
Expected Output:
{
      "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
      "message": 'Record Updated Successfully'
}
Create Domain API
Request TypePOST
Request URLbaseUrl + auth/addon/live_chat/domain/add
Required Fields (In body parameter) :
domain name of domain // without http:// or https://
emailemail for domain register
Expected Output:
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning  
     "message": {
          "name": name domain
          "email": email of domain
          "link": use this code at web page
          "socketLink": use this code at web page
      }
}
Get Domain Info API
Request TypeGET
Request URLbaseUrl + auth/addon/live_chat/domain/get
Required Field (In query parameter)
domain name of domain
Expected Output:
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning  
     "message": {
          "name": name of domain
          "email": email of domain
          "status": status of domain // true => active false=>  inactive,
          "addonUniqueName": unique name of addon 
          "operators": Operator details 
      }
} 
Update Domain API (used to update the status, name, email of domain)
Request TypePUT
Request URLbaseUrl + auth/addon/live_chat/domain/update
Required Fields (In body parameter) :
domain name of domain
updated Fields (minimum one field is mandatory for update) :
new_domainname of domain // new domain name without http:// https:// www
statusstatus of domain // true => active, false => inactive
emailemail for domain // which you want to update
Expected Output:
{
      "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
      "message": 'Domain Update Successfully'
}
Delete Domain API
Request TypeDELETE
Request URLbaseUrl + auth/addon/live_chat/domain/delete
Required Fields (In body parameter) :
domain name of domain
Expected Output:
{
      "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
      "type" : "Success" // success or error or warning  
      "message": 'Domain Deleted Successfully'
}
Assign Operator In Domain At Live Chat Addon
Request TypePOST
Request URLbaseUrl + auth/addon/live_chat/domain/operator/add
Required Fields (In body parameter):
domainname of domain // name of domain at which create operator
emailemail of operator // operator's email that you want to assign at domain
Expected Output :
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning  
     "message": 'Operator Added Successfully'
}
Update Assigned Operator (update operator's online_status, is_admin, active )
Request TypePUT
Request URLbaseUrl + auth/addon/live_chat/domain/operator/update
Required Fields (In body parameter):
domain name of domain
email email of operator
Updated Fields (minimum one field is mandatory for update) :
is_admintrue or false
online_statustrue or false // operator visible online or offline
active true or false // operator getting message or not
Expected Output :
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning
     "message": {
          "operators": 'Operator Updated Successfully'
      }
}
Remove Assigned Operator
Request TypePUT
Request URLbaseUrl + auth/addon/live_chat/domain/operator/remove
Required Fields (In body parameter):
domain name of domain
email email of operator
Expected Output :
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning
     "message": {
          "operators": 'Operator Updated Successfully'
      }
}
Assigned Operator List
Request TypeGET
Request URLbaseUrl + auth/addon/live_chat/domain/operator/list
Required Fields (In query parameter):
domain name of domain
Expected Output :
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning
     "message": [
          {
              "name": { // name  of operator
                  "lastName": last name of operator,
                  "firstName": first name of operator
              },
              "isAdmin": false,     // admin permission
              "chatStatus": true,   // operator's online status
              "active": true,       // operator's activity  
              "userId": "5ebb9869660dcd1a533469e7",
              "email": "saurabhbarnwal1998@gmail.com" // email of operator
          }, {}, {}, .....
      ]
}
Delete User
Request TypeDELETE
Request URLbaseUrl + auth/user/delete
Required Fields (In body parameter):
email email of operator or user
Expected Output :
{
     "status": 1,  // 1=> successfull request, 0=> Un sucessfull request 
     "type" : "Success" // success or error or warning
     "message": {
          "operators": 'User Deleted Successfully'
      }
}