API DOCUMENTS
List of APIs
1. Login .................................................................................................................................. 2
2. GetDocumentList .............................................................................................................. 3
3. GetDocumentListDetail ..................................................................................................... 5
4. GetDocumentDetail .......................................................................................................... 7
1. Login
Login API handles user login process
Header
Content-Type: application/x-www-form-urlencoded
URL
(POST)[Link]
Authentication
This API does not require login.
Request parameters
Name Data Format Description
EmailAddress string (Required) User’s Email Address
Password string (Required) User’s password (to be encoded MD5)
KeepMeLogin boolean (Optional) Keep user’s session long term
default: false
Response example
{
“status”:”OK”,
“token”:”d0637f98f3d549c5bc97eb654e9a6c01”
}
API Specific Status Value
Status Value Description
WrongPassword Password did not match
2. GetDocumentList
Get all Document IDs that the specified user has.
Header
Content-Type: application/x-www-form-urlencoded
URL
(POST)[Link]
Authentication
This API requires User Token (SessionID) authentication
Request parameters
Name Data Format Description
SessionID string (Required)
Ø Capture SessionID from http login request
Ø Validate SessionID with user session id from
database.
§ If SessionID is validated and still not
expired, allow continues process request and
update expiry date for this SessionID. Expiry
Date= Date Time Now + Time duration
expiry (by default 30 minutes)
If SessionID was not validated or was expired, not
allow process this request and return error request
SearchString string (Optional) Search string for using filter response.
SortType number (Optional) Sort by.
1: Title in ascending order
2: Title in descending order
3: Description in ascending order
4: Description in descending order
5: CreateDate in ascending order
6: CreateDate in descending order
7: Staus in ascending order
8: Status in descending order
* Default value is 6
Response example
{
“status”:”OK”,
“document_id”:[
"0123456789abcdef0123456789abcdef",
...
],
}
API Specific Status Value
Status Value Description
sessionIDNotFound User must login
InputParameterError Required input parameters were not found
3. GetDocumentListDetail
Get all Document with details that the specified user has.
Header
Content-Type: application/x-www-form-urlencoded
URL
(POST)[Link]
Authentication
This API requires User Token (SessionID) authentication
Request parameters
Name Data Format Description
(Required)
Ø Capture SessionID from http login request
Ø Validate SessionID with user session id from
database.
§ If SessionID is validated and still not
expired, allow continues process request and
SessionID string update expiry date for this SessionID. Expiry
Date= Date Time Now + Time duration
expiry (by default 30 minutes)
If SessionID was not validated or was expired, not
allow process this request and return error request
DisplayLength number (Required) Maximum number of result per page
DisplayStart number (Required) Input 0 by default
sEcho number (Required) Input 1 by default
SearchString string (Optional) Search string for using filter response.
(Optional) Sort by.
1: Title in ascending order
2: Title in descending order
3: Description in ascending order
4: Description in descending order
SortType number 5: CreateDate in ascending order
6: CreateDate in descending order
7: Staus in ascending order
8: Status in descending order
* Default value is 6
Response example
{
“status”:”OK”,
“document_detail”:[
{
"last_modify_date": "2016/12/03 10:59:20",
"thumbnail": "",
"be_contents_id": "40c27bd2977645c79f1479011f0460de",
"file_name": "Android [Link]",
"description": "",
"id": "e92f9f16449a4501a20fadfcc3b7eb8b",
"title": "Android [Link]",
"type": 1,
"create_date": "2016/12/03 10:59:20",
"be_contents_id_prn": "58bb6eb0d32c4e34a9c171968182d2fb",
"file_size": 604865,
"status": 1
},
...
],
}
API Specific Status Value
Status Value Description
SessionIDNotFound User must login
InputParameterError Required input parameters were not found
4. GetDocumentDetail
Get Documents detail information.
Header
Content-Type: application/x-www-form-urlencoded
URL
(POST)[Link]
Authentication
This API requires User Token (SessionID) authentication
Request parameters
Name Data Format Description
DocumentID string (Required) ID of the document. Capture from
GetDocumentList or GetDocumentListDetail
SessionID string (Required)
Ø Capture SessionID from http login request
Ø Validate SessionID with user session id from
database.
§ If SessionID is validated and still not
expired, allow continues process request and
update expiry date for this SessionID. Expiry
Date= Date Time Now + Time duration
expiry (by default 30 minutes)
§ If SessionID was not validated or was
expired, not allow process this request and
return error request
Response example
{
"status": "OK",
"detail": {
"e92f9f16449a4501a20fadfcc3b7eb8b": {
"last_modify_date": "2016/12/03 10:59:20",
"thumbnail": "",
"be_contents_id": "40c27bd2977645c79f1479011f0460de",
"file_name": "Android [Link]",
"description": "",
"title": "Android [Link]",
"type": 1,
"create_date": "2016/12/03 10:59:20",
"be_contents_id_prn": "58bb6eb0d32c4e34a9c171968182d2fb",
"file_size": 604865,
"status": 1
}
}
}
Response properties
Name Type Description
detail object Object includes all Documents detail information.
document_id object Object includes Document detail information.
* Actual value is Document ID specified by
Parameter.
Response properties in “document_id” object
Name Type Description
title string Document title
description string Document description
be_contents_id string Non printable Document’s ContentsID of Bookend
Service
be_contents_id_prn string Printable Document’s ContentsID of Bookend
Service
status number Document status
1: Active
2: Removed
3: Encoding
type number Document file type
1: PDF
* Other values are reserved for possible future
extension
create_date string Date string of Document creation date in UTC
lastmodify_date string Date string of Document last modify date in UTC