support or question support@datawow.io
NPM
npm install k-sequencing
Import
var kseq = require('k-sequencing');
var kseq = require('k-sequencing');
var data = {
instruction: 'face',
categories: 'face ear eye',
data: 'www.your-image.url',
postback_url: 'www.your-callback.url', multiple: false
};
var projectToken = "your project token"
kseq.choice.create({ token: projectToken, data }).then(result => {
console.log(result.data);
}).catch(err => {
console.error(err);
});
choice.list({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional)
- page (string, optional): Default 0
- per_page (string, optional): Default 20
choice.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- instruction (string, required)
- categories (string group, required): separate group by space
name1 name2 name3
- data (string URL, required)
- allow_empty (boolean, optional): Default is
false
- postback_url (string URL, optional)
- multiple (boolean, optional): Default is
false
- postback_method (string, optional): Default with your project setting. if you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row- staff_id (string, optional)
closedQuestion.list({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional)
- page (string, optional): Default 0
- per_page (string, optional): Default 20
closedQuestion.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- data (string URL, required)
- postback_url (string URL, optional)
- postback_method (string, optional): Default with your project setting. if you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row- staff_id (string, optional)
message.list({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional)
- page (string, optional): Default 0
- per_page (string, optional): Default 20
message.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- instruction (string, required)
- data (string URL, required)
- postback_url (string URL, optional)
- postback_method (string, optional): Default with your project setting. if you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row- staff_id (string, optional)
photoTag.list({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional)
- page (string, optional): Default 0
- per_page (string, optional): Default 20
photoTag.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- instruction (string, required)
- data (string URL, required)
- postback_url (string URL, optional)
- postback_method (string, optional): Default with your project setting. if you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row- staff_id (string, optional)
prediction.list({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional)
- page (int, optional): Default 0
- per_page (int, optional): Default 20
prediction.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- data (string URL, required)
- postback_url (string URL, optional)
- postback_method (string, optional): Default with your project setting. if you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row
image.get({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string URL, required): Image ID or Client's image ID.
kseq.kyc.createCustomer({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- address (String, optional): The customer's address.
- dob (DateTime, optional): The customer's date of birth.
- first_name (String, optional): The customer's first name.
- last_name (String, optional): The customer's last name.
- gender (String, optional): The customer's gender.
- id_card (String, optional): The customer's ID Card.
- email (String, optional): The customer's email.
- custom_id (String, optional): The customize record ID.
kseq.kyc.createDocument({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- data (Array of hash, required): The customer's document images.
- type (String, required): The type of document. e.g.
PASSPORT
DRIVING_LICENSE
SOCIAL_SECURITY_NUMBER
NATIONAL_ID_CARD
NATIONAL_ID_CARD_COMPLETE
VISA
BOOK_BANK
WEBSITE
OTHER
- customer_id (String, required): The customer's ID that belongs to document.
- custom_id (String, optional): The customize record ID.
// Example create document
data: {
customer_id: '5b752f286e11576f13c0324a',
type: 'PASSPORT',
data: [
{
attr: "front_side",
url: "front_pic_url"
},
{
attr: "back_side",
url: "back_pic_url"
}
]
}
kseq.kyc.listCustomer({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- id (String, optional)
- page (String, optional): Default 0
- per_page (String, optional): Default 20
kseq.kyc.listDocument({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- customer_id (String, required)
- id (String, optional)
- page (String, optional): Default 0
- per_page (String, optional): Default 20
First, you need to create profanity filter set which is the list of word that you want to filter out by
profanity.createFilter({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- project_type (string, required): A project type ( for now default is
text_bad_word
)- filter_set (array of string, optional): List of word you want to filter out
- use_default (boolean, optional): Select whether using predefined filter set or custom by your own
profanity.retrieveFilter({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, required): Custom filter set ID.
After you have profanity filter set, you can send stream data of text to sanitize by
profanity.sanitize({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- data (string, required): Stream of text to moderate.
- postback_url (string URL, optional): Where you want us to send result back to
- postback_method (string, optional): Default with your project setting. If you set this parameter that will be override your default setting
- custom_id (string, optional): Use to custom
Primary key
of data row
profanity.result({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional) Text Bad Word's Custom ID
category.create({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- conversation (Array of hash, required): Stream of text to moderate.
"conversation": [
{
"name": "p1",
"message": "hello p2"
},
{
"name": "p2",
"message": "hello p1"
}
]
- title (string, optional): Title of conversation
- postback_url (string URL, optional): Where you want us to send result back to
- postback_method (string, optional): Default with your project setting. If you set this parameter that will be override your default setting
- allow_empty (boolean, optional): Default is
false
- custom_id (string, optional): Use to custom
Primary key
of data row
category.get({ token: <authorization>, data: <params> })
- authorization (string, header, required): Token of your project
- id (string, optional) Text Category's ID or Custom ID
kseq.textClosedQuestion.create({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- data (String, required): The stream of text.
- custom_id (String, optional): The customize record ID.
- postback_url (String URL, optional): Postback's URL.
- postback_method (String, optional): Postback's method.
kseq.textClosedQuestion.list({ token: <project-token>, data: <payload> })
- id (String, optional)
- page (String, optional): Default 0
- per_page (String, optional): Default 20
kseq.conversation.create({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- conversation (Array of String, required): The list of conversation.
- custom_conversation_ids (Array of String, optional): The list of customization's conversation ID.
- postback_url (String URL, optional): Postback's URL.
- postback_method (String, optional): Postback's method.
kseq.conversation.list({ token: <project-token>, data: <payload> })
- id (String, optional)
- page (String, optional): Default 0
- per_page (String, optional): Default 20
kseq.facebookPage.create({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- page_id (String, required): The Facebook Page ID.
- actions (Hash, required): The hash of keyword and action.
// Example of data's structure.
data: {
page_id: "245473502860590",
actions: { word: 'foo', action: 'removed' },
}
kseq.facebookPage.get({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- page_id (String, required): The Facebook Page ID.
kseq.facebookPage.getFeed({ data: <payload> })
- page_id (String, required): The Facebook Page ID.
- start_date (DateTime, optional): The start range of feed date. (Default: Start date of current month)
- end_date (DateTime, optional): The end range of feed date. (Default: End date of current month)
kseq.video.create({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- data (String, required): The video's url.
- custom_id (String, optional): The customize record ID.
- postback_url (String URL, optional): Postback's URL.
- postback_method (String, optional): Postback's method.
- muted (Boolean, optional): Opiton to mute video's sound.
- allow_seeking (Boolean, optional): Option to be able to seek.
- play_at (Integer, optional): The specific video starter point.
kseq.video.get({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- id (String, required): The Video Closed Question's ID.
kseq.video.list({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- id (String, optional):
- page (String, optional): Default 0
- per_page (String, optional): Default 20
kseq.aiConsensus.create({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- data (String, required): The image's url.
- custom_id (String, optional): The customize record ID.
- postback_url (String URL, optional): Postback's URL.
- postback_method (String, optional): Postback's method.
kseq.aiConsensus.list({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- id (String, optional):
- page (String, optional): Default 0
- per_page (String, optional): Default 20
kseq.documentVerification.create({
token: <project-token>,
data: {
data: "https://assets-cdn.github.com/images/modules/open_graph/github-mark.png",
info: {
type: {
value: "driver_license"
},
dob: {
value: "1983/12/26"
}
}
}
}).then(result => {
console.log(result.data.data);
})
- project-token (String, header, required): The token of your project.
- data (String, required): The document image's url.
- info (Hash, required): The Document information.
- custom_id (String, optional): The customize record ID.
- postback_url (String URL, optional): Postback's URL.
- postback_method (String, optional): Postback's method.
kseq.documentVerification.list({ token: <project-token>, data: <payload> })
- project-token (String, header, required): The token of your project.
- id (String, optional):
- page (String, optional): Default 0
- per_page (String, optional): Default 20