NAV
bash javascript php python

digi360.io API reference portal

Below documentation is due for revision thus we request you to kindly reach us at oneemail@digi360.io in case you have any queries.

Document Generation Service

This API service can be used to generate documents in prominent Indian regional languages and numerous International languages. It is useful in case business needs to frequently create multiple documents in different languages.

Document Generation Service

Client will use our API services to send the dynamic values and in response we will send the generated documents (PDF/Docx formats only) in base64 encoded JSON.

Sample request:

curl -X POST "/api/v1/generated-document-api-response" \
    -H "Content-Type: application/json" \
    -d '{"company_id":"1000001","company_service_key":"odit","document_id":"1","word_param":"variables in json format","output_language":"est",,"output_format":"PDF","urn":"recusandae"}'
const url = new URL("/api/v1/generated-document-api-response");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
	"company_id": "1000001",
	"company_service_key": "odit",
	"document_id": "1",
	"word_param": "variables in json format",
	"output_language": "est",    
	"output_format": "PDF",
	"urn": "recusandae"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("/api/v1/generated-document-api-response", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
		"company_id" => "1000001",
		"company_service_key" => "odit",
		"document_id" => "1",
		"word_param" => "variables in json format",
		"output_language" => "est",         
		"output_format" =>"PDF",
		"urn" => "recusandae",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '/api/v1/generated-document-api-response'
payload = {
		'company_id': '1000001',
		'company_service_key': 'odit', 
		'document_id': '1',  
		'word_param': 'variables in json format',  
		'output_language': 'est',  
		'output_format': 'PDF'
		'urn': 'recusandae'  
    }
headers = {
            'Content-Type': 'application/json'  }
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Sample response (200):

{
    "success": true,
    "data": {
        "data": "PDF or DOCX file in Base64 format",
        "urn": "recusandae",
        "output_format": "DOCX"
    },
    "message": "Template converted successfully."
}

Sample response (404):

{
    "success": false,
    "message": "Error description"
}

HTTP Request

POST https://apihub.digi360.io/api/v1/generated-document-api-response

Body Parameters

Parameter Type Status Description
company_id integer mandatory Unique Identification number which is assgined to your company.
company_service_key varchar mandatory Unique key assigned to each client for individual service. eg. document generation api, sentiment analysis service and others.
document_id varchar mandatory Unique identification ID assigned to original base document shared by customer.
word_param blob mandatory Input details which will be filled in the document.
output_language varchar mandatory Language in which the output document to be generated.
output_format varchar mandatory Output document format i.e. PDF or DOCX.
urn varchar optional Unique reference value sent by client for tracking.

Sentiment Analysis Service

API to analyze your end customer's sentiments and emotions and to determining whether the communication sent by your customer is positive, negative or neutral.
There are two ways through which we can analyze sentiments for you,

  1. Integration with your CRM mailbox - Sentiments once extracted from customer email will be pushed to your CRM platform. Alternatively, you can also pull the data through our API.
  2. API Integration - You can send the text to us using our API and we will process it on real-time basis.

Sentiment Analysis Service - Integration with CRM Mailbox

In this method of integration, we will automatically post the sentiment analysis on your CRM platform in 10 seconds (approximately) after customer email reach random email address allocated to you.
However, in an event when you would like to pull the sentiments of a specific email. You can create an event in your CRM and request following API.

Sample request:

curl -X POST "/api/v1/sentiment-analyze-pull-request" \
    -H "Content-Type: application/json" \
    -d '{"company_id":"1000001","company_service_key":"ut","subject":"New Helpful Articles","sender_email_id":"oneemail@digi360.io","date":"2019-07-08"}'
const url = new URL("/api/v1/sentiment-analyze-pull-request");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "company_id": "1000001",
    "company_service_key": "ut",    
    "subject": "New Helpful Articles",
    "sender_email_id": "oneemail@digi360.io",
    "date": "2019-07-08"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("/api/v1/sentiment-analyze-pull-request", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
        "company_id" => "1000001",
	    "company_service_key" => "ut",
        "subject" => "New Helpful Articles",
        "sender_email_id" => "oneemail@digi360.io"
		"date" => "2019-07-08",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '/api/v1/sentiment-analyze-pull-request'
payload = {
		'company_id': '1000001',
		'company_service_key': 'ut',  
		'subject': 'New Helpful Articles',  
		'sender_email_id': 'oneemail@digi360.io',  
		'date': '2019-07-08'  
    }
headers = {
            'Content-Type': 'application/json'  }
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Sample response (200):

{
    "success": true,
    "data": {
        "cs_env_code": 109,
        "cs_date": "2019-07-08",
        "cs_email_subject": "New Helpful Articles",
        "cs_sender_email_id": "oneemail@digi360.io",
        "cs_oa_sent_score": -0.904585,
        "cs_oa_sentiment": "negative",
        "cs_emo_sadness": 0.168498,
        "cs_emo_fear": 0.123842,
        "cs_emo_joy": 0.040336,
        "cs_emo_disgust": 0.164978,
        "cs_emo_anger": 0.610673,
        "cs_prominent_emotion": "cs_emo_anger"
    },
    "message": "Data fetched successfully"
}

Sample response (404):

{
    "success": false,
    "message": "Error description"
}

HTTP Request

POST https://apihub.digi360.io/api/v1/sentiment-analyze-pull-request

Body Parameters

Parameter Type Status Description
company_id integer mandatory Unique Identification number which is assgined to your company.
company_service_key varchar mandatory Unique key assigned to each client for individual service. eg. document generation api, sentiment analysis service and others.
subject varchar mandatory Subject of email which is sent by the end customer to the client.
sender_email_id varchar mandatory Email ID of end customer who sent an email to client.
date date mandatory Date on which email was sent by the end customer to the client.

Sentiment Analysis Service - for input text analysis

In this method of integration, client will send us the input text and we will perform the sentiment analysis on a real-time basis.

Sample request:

curl -X POST "/api/v1/sentiment-analyze-api" \
    -H "Content-Type: application/json" \
    -d '{"company_id":"1000001","company_service_key":"dolore","text":"Hello how are you","urn":"quibusdam"}'
const url = new URL("/api/v1/sentiment-analyze-api");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
    "company_id": "1000001",
    "company_service_key": "dolore",
    "text": "Hello how are you",
    "urn": "quibusdam"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("/api/v1/sentiment-analyze-api", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
            "company_id" => "1000001",
	    "company_service_key" => "dolore",
            "text" => "Hello how are you",            
            "urn" => "quibusdam",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '/api/v1/sentiment-analyze-api'
payload = {
            'company_id': '1000001', 
	    'company_service_key': 'dolore',  
            'text': 'Hello how are you',  
            'urn': 'quibusdam'  
    }
headers = {
            'Content-Type': 'application/json'  }
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Sample response (200):

{
    "success": true,
    "data": {
        "cs_env_code": 109,
        "cs_date": "2019-07-08",
        "cs_oa_sent_score": -0.904585,
        "cs_oa_sentiment": "negative",
        "cs_emo_sadness": 0.168498,
        "cs_emo_fear": 0.123842,
        "cs_emo_joy": 0.040336,
        "cs_emo_disgust": 0.164978,
        "cs_emo_anger": 0.610673,
        "cs_prominent_emotion": "cs_emo_anger",
	"urn": "quibusdam"
    },
    "message": "Data fetched successfully"
}

Sample response (404):

{
    "success": false,
    "message": "Error description"
}

HTTP Request

POST https://apihub.digi360.io/api/v1/sentiment-analyze-api

Body Parameters

Parameter Type Status Description
company_id integer mandatory Unique Identification number which is assgined to your company.
company_service_key varchar mandatory Unique key assigned to each client for individual service. eg. document generation api, sentiment analysis service and others.
text varchar mandatory Input text for sentiment analysis.
urn varchar optional Unique reference value sent by client for tracking.

Text Translation Service

Text Translation API

Text Translation Service can translate text across prominent Indian languages and numerous international languages. This service will allow you to convert communication (SMS/Email) before sending them to your end customers or translate a section of document.

Sample request:

curl -X POST "/api/v1/translation-api-response" \
    -H "Content-Type: application/json" \
    -d '{"company_id":"1000001","company_service_key":"sequi","input_source":"1","input_language":"exercitationem","input_text":"Hello how are you","output_language":"porro","urn":"nisi"}'
const url = new URL("/api/v1/translation-api-response");

let headers = {
    "Content-Type": "application/json",
    "Accept": "application/json",
}

let body = {
	"company_id": "1000001",
	"company_service_key": "sequi",
	"input_source": "1",
	"input_language": "exercitationem",
	"input_text": "Hello how are you",
	"output_language": "porro", 
	"urn": "nisi"
}

fetch(url, {
    method: "POST",
    headers: headers,
    body: body
})
    .then(response => response.json())
    .then(json => console.log(json));

$client = new \GuzzleHttp\Client();
$response = $client->post("/api/v1/translation-api-response", [
    'headers' => [
            "Content-Type" => "application/json",
        ],
    'json' => [
		"company_id" => "1000001",
		"company_service_key" => "sequi",
		"input_source" => "1",
		"input_language" => "exercitationem",
		"input_text" => "Hello how are you",
		"output_language" => "porro",       
		"urn" => "nisi",
        ],
]);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '/api/v1/translation-api-response'
payload = {
		'company_id': '1000001',
		'company_service_key': 'sequi',
		'input_source': '1',  
		'input_language': 'exercitationem',
		'input_text': 'Hello how are you',			
		'output_language': 'porro',  
		'urn': 'nisi'  
    }
headers = {
            'Content-Type': 'application/json'  }
response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Sample response (200):

{
    "success": true,
    "data": {
        "input": "Hello how are you.",
        "output": "Hello how are you.",
        "urn": "nisi"
    },
    "message": "Data translated successfully."
}

Sample response (404):

{
    "success": false,
    "message": "Error description"
}

HTTP Request

POST https://apihub.digi360.io/api/v1/translation-api-response

Body Parameters

Parameter Type Status Description
company_id integer mandatory Unique Identification number which is assgined to your company.
company_service_key varchar mandatory Unique key assigned to each client for individual service. eg. document generation api, sentiment analysis service and others.
input_source varchar mandatory Identified to identify the input source. Default value is "1".
input_language varchar optional Input text language.
input_text varchar mandatory Input text which needs to be translated.
output_language varchar mandatory Language in which output is required.
urn varchar optional Unique reference value sent by client for tracking.

Errors

Pre-definded Errors

Errors Description
400 Bad request HTTP request that was sent to the server has invalid syntax
403 Forbidden Client made a valid request but the server is refusing to serve the request, due to a lack of permission to access the requested resource
404 Not Found Client is able to communicate with the server but it is unable to locate the requested file or resource
503 Service unavailable server is overloaded or under maintenance.
500 Internal Server Error server cannot process the request for an unknown reason

User-defined Errors

Errors Description
Your Company ID is not registered with us. Please reach out to our support team. Client's company not registered or no longer active.
Your Company Subscription is no longer Active. Please reach out to our support team. Client's subscription for a specific service has been expired.
This service is not available to your Company ID. Please check the service key or reach out to our support team. Service not registered with company.
This service is not available anymore. Please reach out to our support team. Service is no longer available.