This function has not been implemented yet.
Follow us to get updates on ContractWorkBox.
Welcome to ContractWorkBox API, a software layer that allows your platform/application to interact with ContractWorkBox. The platform is designed to provide document navigation and translation functionalities and integrate them in your system. The API functions support common tasks and operations such as user authentication and logout, document upload and structure identification, document opening with ContractWorkBox Smart View, etc. .
Each API Endpoint supports both the REST and RPC Endpoint formats.
The default endpoint response format is JSON unless otherwise specified.
The Endpoints in REST format are reported below.
Registered users can login to establish their identity and start a session with the application using the API below. The Application KEY required in the authentication process may be requested from the Request APP Key form.
POST
https://www.contractworkbox.com/api/gkp/users/authorize
app_key=app_key_id
Where:
Argument | Description |
---|---|
app_key_id | String The Application KEY you are provided when you register to the ContractWorkBox API service. |
Where:
Argument | Description |
---|---|
error | Int The result of the Authentication. If correctly authenticated, then 0 (zero) is returned. |
message_key | String A human-readable description of the Authentication result. |
hash | String A temporary access TOKEN to be used in the API requests. |
expire | Int (Timestamp) The expire datetime of the session. |
availSpace | Int The total available space (in MB). |
trCredits | Int The Translation Credits available to be consumed. |
usedSpace | Int The space used (in Bytes). |
The Logout operation terminates user session and disassociates the authenticated user from the subsequent requests made by the client application.
GET
https://www.contractworkbox.com/api/gkp/users/logout
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
The document file upload operation delivers and saves a local file in the remote ContractWorkBox file storage. The document is then automatically processed by ContractWorkBox.
POST
https://www.contractworkbox.com/api/gkp/documents
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
file=@path_to_file
Where:
Argument | Description |
---|---|
path_to_file | String The path to the file to be uploaded. |
Where:
Argument | Description |
---|---|
fileId | String A unique Identifier for the document. |
filename | String The Name of the document file. |
created | Int (Timestamp) The date/time of the document's upload. |
availSpace | Int The total available space (in MB). |
usedSpace | Int The space used (in Bytes). |
The "Delete" operation deletes a Document previously uploaded.
DELETE
https://www.contractworkbox.com/api/gkp/documents/fileId
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
Where:
Argument | Description |
---|---|
availSpace | Int The total available space (in MB). |
usedSpace | Int The space used (in Bytes) after that the document is deleted. |
The "Open URL" operation retrieves an URL that can be utilized to navigate a document previously uploaded with the ContractWorkBox Smart View.
GET
https://www.contractworkbox.com/api/gkp/documents/fileId/url
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
Where:
Argument | Description |
---|---|
url | String A URL that can be utilized to access the document from a browser. |
The "Open Document" operation is a shortcut for opening a previously uploaded document directly from the browser, without getting the Open URL. The response format, if the operation is successful, is a ContractWorkBox Smart View HTML page showing the document.
GET
https://www.contractworkbox.com/api/gkp/documents/fileId/open?hash=hash
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
hash | String The temporary access TOKEN returned by the Authentication. |
The "Document List" operation lists all the document uploaded.
GET
https://www.contractworkbox.com/api/gkp/documents
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
Where:
Argument | Description |
---|---|
documents | Array The list of the documents uploaded. Each element of the Array is an Object corresponding to a document, with the fields described as following. |
fileId | String A unique Identifier for the document. |
filename | String The Name of the document file. |
name | String The Title of the document. |
modified | Int (Timestamp) The date/time of the last modification. |
created | Int (Timestamp) The date/time of the document's upload. |
nDocuments | Int The number of the documents returned (must be equal to the length of the Array "documents"). |
The Endpoints in RPC format are reported below.
Registered users can login to establish their identity and start a session with the application using the API below. The Application KEY required in the authentication process may be requested from the Request APP Key form.
POST
https://www.contractworkbox.com/api/gkp/authorize
app_key=app_key_id
Where:
Argument | Description |
---|---|
app_key_id | String The Application KEY you are provided when you register to the ContractWorkBox API service. |
Where:
Argument | Description |
---|---|
error | Int The result of the Authentication. If correctly authenticated, then 0 (zero) is returned. |
message_key | String A human-readable description of the Authentication result. |
hash | String A temporary access TOKEN to be used in the API requests. |
expire | Int (Timestamp) The expire datetime of the session. |
availSpace | Int The total available space (in MB). |
trCredits | Int The Translation Credits available to be consumed. |
usedSpace | Int The space used (in Bytes). |
The Logout operation terminates user session and disassociates the authenticated user from the subsequent requests made by the client application.
GET
https://www.contractworkbox.com/api/gkp/logout
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
The document file upload operation delivers and saves a local file in the remote ContractWorkBox file storage. The document is then automatically processed by ContractWorkBox.
POST
https://www.contractworkbox.com/api/gkp/upload_document
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
file=@path_to_file
Where:
Argument | Description |
---|---|
path_to_file | String The path to the file to be uploaded. |
Where:
Argument | Description |
---|---|
fileId | String A unique Identifier for the document. |
filename | String The Name of the document file. |
created | Int (Timestamp) The date/time of the document's upload. |
availSpace | Int The total available space (in MB). |
usedSpace | Int The space used (in Bytes). |
The "Delete" operation deletes a Document previously uploaded.
POST
https://www.contractworkbox.com/api/gkp/delete_document
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
id=fileId
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
Where:
Argument | Description |
---|---|
availSpace | Int The total available space (in MB). |
usedSpace | Int The space used (in Bytes) after that the document is deleted. |
The "Open URL" operation retrieves an URL that can be utilized to navigate a document previously uploaded with the ContractWorkBox Smart View.
GET
https://www.contractworkbox.com/api/gkp/get_document_url
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
id=fileId
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
Where:
Argument | Description |
---|---|
url | String A URL that can be utilized to access the document from a browser. |
The "Open Document" operation is a shortcut for opening a previously uploaded document directly from the browser, without getting the Open URL. The response format, if the operation is successful, is a ContractWorkBox Smart View HTML page showing the document.
GET
https://www.contractworkbox.com/api/gkp/get_document_url
Where:
Argument | Description |
---|---|
fileId | String The unique Identifier for the document file to be deleted. |
hash | String The temporary access TOKEN returned by the Authentication. |
The "Document List" operation lists all the document uploaded.
GET
https://www.contractworkbox.com/api/gkp/list_documents
Where:
Argument | Description |
---|---|
hash | String The temporary access TOKEN returned by the Authentication. |
Where:
Argument | Description |
---|---|
documents | Array The list of the documents uploaded. Each element of the Array is an Object corresponding to a document, with the fields described as following. |
fileId | String A unique Identifier for the document. |
filename | String The Name of the document file. |
name | String The Title of the document. |
modified | Int (Timestamp) The date/time of the last modification. |
created | Int (Timestamp) The date/time of the document's upload. |
nDocuments | Int The number of the documents returned (must be equal to the length of the Array "documents"). |
The most common error codes with an explanation of the possible causes are reported in the following table.
Code | Error Message / Description |
---|---|
#E00 | Generic Error This error code is returned if more specific details on the error occurred are not available |
#E01 | Error Saving File An error occurred while storing of the uploaded file to the ContractWorkBox cloud. |
#E02 | Error: Converted File too long The size limit for the structure analyzed has been exceeded. |
#E03 | Error: Uploaded File too long The size limit for the file uploaded has been exceeded. |
#E04 | Error: Cloud Space Limit overcome The total space limit in the ContractWorkBox Cloud has been exceeded. |
#E05 | Error Processing PDF An error occurred when converting the uploaded file into HTML. |
#E06 | Error: Too many PDF uploaded The number limit of file uploads in 15 minutes has been exceeded. |
#E07 | Missing Converted File The converted HTML file is missing. |
#E08 | Unable to creating directory An error occurred when creating a directory in the ContractWorkBox server. |
#E09 | Error: Text Extraction from PDF not allowed The content extraction of the PDF document uploaded is not allowed (SECURED document). |
#E10 | Signup Error An error occurred in the user registration process. |
#E07 | Missing Original File The uploaded file is missing in the ContractWorkBox server. |
#E11 | Error: Resource not found The API resource/method cannot be found. |
#E12 | Error: Invalid or Missing App KEY The App KEY is missing in the Authorization request. |
#E14 | Error: Account Not Active The Account related to the App KEY is not active. |
#E15 | Error Logging Out An error occurred in the logout process. |
#E16 | Error: Missing Parameters One or more required parameters are missing in the API request. |
#E19 | Error Identifying Structure An error occurred identifying the structure of the uploaded document. |
#E20 | Error Identifying Structure: Missing Section(s) One or more (sub)sections are missing / could not have been identified in the uploaded document. |
#E21 | Error Identifying Structure: Section(s) Duplicated One or more (sub)sections have been identified as duplicated in the uploaded document. |
#E40 | Error Translating An error occurred translating the content of the document. |
#E41 | Error: Translation Credits exhausted The Translation Credits exhausted in the Account. |
#W01 | Warning: Not Logged Possible reasons of this error are: the hash is not valid, or the related session has expired. |
Error sending the message.
Please try again later.