All URIs are relative to https://lilt.com/2
Method | HTTP request | Description |
---|---|---|
advanceWorkflowStage | POST /document/{documentId}/task/{taskId}/advance | Advance workflow to the next stage |
getDocumentWorkflow | GET /workflows/document/{documentId} | Retrieve document Workflow metadata |
getWorkflowTemplates | GET /workflows/templates | Retrieve workflow templates |
rejectWorkflowStage | POST /document/{documentId}/task/{taskId}/reject | Move workflow to the previous stage |
setDocumentStage | PUT /workflows/{documentId}/stage | Set Workflow stage for a document |
NextWorkflowTask advanceWorkflowStage(documentId, taskId)
Advance workflow to the next stage
Advance a workflow to the next stage and mark current workflow task as complete. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/workflows/document/{documentId}/task/{taskId}/advance?key=API_KEY' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.WorkflowsApi();
let documentId = 56; // Number | A document id.
let taskId = 56; // Number | The task id of the current workflow stage.
apiInstance.advanceWorkflowStage(documentId, taskId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
documentId | Number | A document id. | |
taskId | Number | The task id of the current workflow stage. |
- Content-Type: Not defined
- Accept: application/json
DocumentWorkflow getDocumentWorkflow(documentId)
Retrieve document Workflow metadata
Get Workflow metadata related to a document. This is useful for gathering information about the current Workflow stage of a document. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/workflows/document/{documentId}?key=API_KEY' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.WorkflowsApi();
let documentId = 56; // Number | A document id.
apiInstance.getDocumentWorkflow(documentId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
documentId | Number | A document id. |
- Content-Type: Not defined
- Accept: application/json
[WorkflowTemplate] getWorkflowTemplates()
Retrieve workflow templates
Get all the possible Workflow Templates owned by the team. Useful for retrieving the ids corresponding to each workflow tables, and passing them to subsequent requests, for example, creating a new Job with a specific Workflow. Example CURL: ``` curl --X --request GET 'https://lilt.com/2/workflows/templates?key=API_KEY' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.WorkflowsApi();
apiInstance.getWorkflowTemplates().then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
NextWorkflowTask rejectWorkflowStage(documentId, taskId)
Move workflow to the previous stage
Move a workflow to the previous stage and mark current workflow task as rejected. Example CURL: ``` curl --X --request POST 'https://lilt.com/2/workflows/document/{documentId}/task/{taskId}/reject?key=API_KEY' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.WorkflowsApi();
let documentId = 56; // Number | A document id.
let taskId = 56; // Number | The task id of the current workflow stage.
apiInstance.rejectWorkflowStage(documentId, taskId).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
documentId | Number | A document id. | |
taskId | Number | The task id of the current workflow stage. |
- Content-Type: Not defined
- Accept: application/json
NextWorkflowTask setDocumentStage(documentId, opts)
Set Workflow stage for a document
Set the Workflow stage for a document. You can find the stage information required for this request from the "Retrieve document Workflow metadata" endpoint. Example CURL: ``` curl --X --request PUT 'https://lilt.com/2/workflows/document/{documentId}/stage?key=API_KEY' \ --header 'Content-Type: application/json' \ --data-raw '{ "workflowStageId": {workflowStageId} }' ```
import LiltNode from 'lilt-node';
let defaultClient = LiltNode.ApiClient.instance;
// Configure API key authorization: ApiKeyAuth
let ApiKeyAuth = defaultClient.authentications['ApiKeyAuth'];
ApiKeyAuth.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKeyAuth.apiKeyPrefix = 'Token';
// Configure HTTP basic authorization: BasicAuth
let BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME';
BasicAuth.password = 'YOUR PASSWORD';
let apiInstance = new LiltNode.WorkflowsApi();
let documentId = 56; // Number | A document id.
let opts = {
'workflowStageId': new LiltNode.SetDocumentStageRequest() // SetDocumentStageRequest |
};
apiInstance.setDocumentStage(documentId, opts).then((data) => {
console.log('API called successfully. Returned data: ' + data);
}, (error) => {
console.error(error);
});
Name | Type | Description | Notes |
---|---|---|---|
documentId | Number | A document id. | |
workflowStageId | SetDocumentStageRequest | [optional] |
- Content-Type: application/json
- Accept: application/json