Class: WebMergeAPI

webmerge~WebMergeAPI

API client with a callback API

Constructor

new WebMergeAPI(key, secret)

Create an API client that uses callbacks.
Parameters:
Name Type Description
key string API key
secret string API secret
Source:

Methods

combineFiles(data, callback)

Combine multiple files (pages) into a single file.
Parameters:
Name Type Description
data Object See https://www.webmerge.me/developers/tools
callback
Source:

convertToPDF(data, callback)

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)
callback
Source:

copyDocument(id, data, callback)

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
callback
Source:

createDataRoute(data, callback)

Create a new data route.
Parameters:
Name Type Description
data Object https://www.webmerge.me/developers/routes
callback
Source:

createDocument(data, callback)

Create a new document. Depending on the type of document you are creating, different parameters are required
Parameters:
Name Type Description
data Object See https://www.webmerge.me/developers/documents
callback
Source:

deleteDataRoute(id, callback)

Delete a data route.
Parameters:
Name Type Description
id number Data Route ID
callback
Source:

deleteDocument(id, callback)

Delete a document
Parameters:
Name Type Description
id number Document ID
callback
Source:

getDataRoute(id, callback)

Retrieve a specific data route
Parameters:
Name Type Description
id number Data Route ID
callback
Source:

getDataRouteFields(id, callback)

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
callback
Source:

getDataRouteRules(id, callback)

Retrieve a list of rules for a specific data route.
Parameters:
Name Type Description
id number Data Route ID
callback
Source:

getDataRoutes(callback)

Retrieve a list of data routes.
Parameters:
Name Type Description
callback
Source:

getDocument(id, callback)

Retrieve a specific document.
Parameters:
Name Type Description
id number Document ID
callback
Source:

getDocumentFields(id, callback)

Retrieve a list of fields for a specific document.
Parameters:
Name Type Description
id number Document ID
callback
Source:

getDocumentFiles(id, callback)

Retrieve the file that was uploaded for a specific document (pdf, docx, xlsx, or pptx)
Parameters:
Name Type Description
id number Document ID
callback
Source:

getDocuments(options, callback)

Retrieve a list of documents.
Parameters:
Name Type Description
options Object
Properties
Name Type Description
search string Search term
folder string Folder name
callback
Source:

mergeDataRoute(id, key, data, isTestMode, downloadFile, callback)

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
callback
Source:

mergeDocument(id, key, data, isTestMode, downloadFile, callback)

Merge a document.
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
callback
Source:

updateDataRoute(id, data, callback)

Update a data route.
Parameters:
Name Type Description
id number Data Route ID
data Object
callback
Source:

updateDocument(id, data, callback)

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 Object
callback
Source: