Constructor
new WebMergePromiseAPI(key, secret)
Create an API client that uses Promises.
Parameters:
Name |
Type |
Description |
key |
string
|
API key |
secret |
string
|
API secret |
- Source:
Extends
Methods
combineFiles(data)
Combine multiple files (pages) into a single file.
Parameters:
- Source:
convertToPDF(data)
Convert file to PDF
Parameters:
Name |
Type |
Description |
data |
Object
|
Properties
Name |
Type |
Description |
file |
Object
|
Properties
Name |
Type |
Description |
name |
string
|
File Name |
url |
string
|
Remote File URL (required if 'contents' is empty) |
contents |
string
|
Base64-encoded file (required if 'url' is empty) |
|
|
- Source:
copyDocument(id, data)
Create a copy of a document.
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
data |
Object
|
Properties
Name |
Type |
Description |
name |
string
|
Name of the new document |
|
- Source:
createDataRoute(data)
Create a new data route.
Parameters:
Name |
Type |
Description |
data |
Object
|
https://www.webmerge.me/developers/routes |
- Source:
createDocument(data)
Create a new document.
Depending on the type of document you are creating, different parameters are required
Parameters:
- Source:
deleteDataRoute(id)
Delete a data route.
Parameters:
Name |
Type |
Description |
id |
number
|
Data Route ID |
- Source:
deleteDocument(id)
Delete a document
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
- Source:
getDataRoute(id)
Retrieve a specific data route
Parameters:
Name |
Type |
Description |
id |
number
|
Data Route ID |
- Source:
getDataRouteFields(id)
Retrieve a list of fields for a specific data route.
This includes fields from all documents in routing rules.
Parameters:
Name |
Type |
Description |
id |
number
|
Data Route ID |
- Source:
getDataRouteRules(id)
Retrieve a list of rules for a specific data route.
Parameters:
Name |
Type |
Description |
id |
number
|
Data Route ID |
- Source:
getDataRoutes(callback)
Retrieve a list of data routes.
Parameters:
Name |
Type |
Description |
callback |
|
|
- Source:
getDocument(id)
Retrieve a specific document.
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
- Source:
getDocumentFields(id)
Retrieve a list of fields for a specific document.
Parameters:
Name |
Type |
Description |
id |
|
Document ID |
- Source:
getDocumentFiles(id)
Retrieve the file that was uploaded for a specific document (pdf, docx, xlsx, or pptx)
Parameters:
Name |
Type |
Description |
id |
|
Document ID |
- Source:
getDocuments(options)
Retrieve a list of documents.
Parameters:
Name |
Type |
Description |
options |
Object
|
Properties
Name |
Type |
Description |
search |
string
|
Search term |
folder |
string
|
Folder name |
|
- Source:
mergeDataRoute(id, key, data, isTestMode, downloadFile)
Merge a data route.
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
key |
string
|
Document key |
data |
Object
|
Data to be merged |
isTestMode |
boolean
|
Merge the document in "test" mode |
downloadFile |
boolean
|
Return the merged document in response |
- Source:
mergeDocument(id, key, data, isTestMode, downloadFile)
Merge a data route.
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
key |
string
|
Document key |
data |
Object
|
Data to be merged |
isTestMode |
boolean
|
Merge the document in "test" mode |
downloadFile |
boolean
|
Return the merged document in response |
- Source:
updateDataRoute(id, data)
Update a data route.
Parameters:
Name |
Type |
Description |
id |
number
|
Data Route ID |
data |
Object
|
|
- Source:
updateDocument(id, data)
Update a document.
You cannot change the type of document, but you can change many of the other settings as well as change the
contents of the document. Only parameters that are sent in the request will be updated.
Parameters:
Name |
Type |
Description |
id |
number
|
Document ID |
data |
|
|
- Source: