Skip to content

Latest commit

 

History

History
1800 lines (1330 loc) · 50.1 KB

PDFApi.md

File metadata and controls

1800 lines (1330 loc) · 50.1 KB

DocSpring.PDFApi

All URIs are relative to https://api.docspring.com/api/v1

Method HTTP request Description
addFieldsToTemplate PUT /templates/{template_id}/add_fields Add new fields to a Template
batchGeneratePdfV1 POST /templates/{template_id}/submissions/batch Generates multiple PDFs
batchGeneratePdfs POST /submissions/batches Generates multiple PDFs
combinePdfs POST /combined_submissions?v=2 Merge submission PDFs, template PDFs, or custom files
combineSubmissions POST /combined_submissions Merge generated PDFs together
copyTemplate POST /templates/{template_id}/copy Copy a Template
createCustomFileFromUpload POST /custom_files Create a new custom file from a cached presign upload
createDataRequestToken POST /data_requests/{data_request_id}/tokens Creates a new data request token for form authentication
createFolder POST /folders/ Create a folder
createHTMLTemplate POST /templates?desc=html Create a new HTML template
createPDFTemplate POST /templates Create a new PDF template with a form POST file upload
createPDFTemplateFromUpload POST /templates?desc=cached_upload Create a new PDF template from a cached presign upload
deleteFolder DELETE /folders/{folder_id} Delete a folder
deleteTemplate DELETE /templates/{template_id} Delete a template
expireCombinedSubmission DELETE /combined_submissions/{combined_submission_id} Expire a combined submission
expireSubmission DELETE /submissions/{submission_id} Expire a PDF submission
generatePDF POST /templates/{template_id}/submissions Generates a new PDF
getCombinedSubmission GET /combined_submissions/{combined_submission_id} Check the status of a combined submission (merged PDFs)
getDataRequest GET /data_requests/{data_request_id} Look up a submission data request
getFullTemplate GET /templates/{template_id}?full=true Fetch the full template attributes
getPresignUrl GET /uploads/presign Get a presigned URL so that you can upload a file to our AWS S3 bucket
getSubmission GET /submissions/{submission_id} Check the status of a PDF
getSubmissionBatch GET /submissions/batches/{submission_batch_id} Check the status of a submission batch job
getTemplate GET /templates/{template_id} Check the status of an uploaded template
getTemplateSchema GET /templates/{template_id}/schema Fetch the JSON schema for a template
listCombinedSubmissions GET /combined_submissions Get a list of all combined submissions
listFolders GET /folders/ Get a list of all folders
listSubmissions GET /submissions List all submissions
listSubmissions_0 GET /templates/{template_id}/submissions List all submissions for a given template
listTemplates GET /templates Get a list of all templates
moveFolderToFolder POST /folders/{folder_id}/move Move a folder
moveTemplateToFolder POST /templates/{template_id}/move Move Template to folder
renameFolder POST /folders/{folder_id}/rename Rename a folder
testAuthentication GET /authentication Test Authentication
updateDataRequest PUT /data_requests/{data_request_id} Update a submission data request
updateTemplate PUT /templates/{template_id} Update a Template

addFieldsToTemplate

AddFieldsTemplateResponse addFieldsToTemplate(templateId, addFieldsData)

Add new fields to a Template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000002; // String | 
var addFieldsData = new DocSpring.AddFieldsData(); // AddFieldsData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.addFieldsToTemplate(templateId, addFieldsData, callback);

Parameters

Name Type Description Notes
templateId String
addFieldsData AddFieldsData

Return type

AddFieldsTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

batchGeneratePdfV1

[CreateSubmissionResponse] batchGeneratePdfV1(templateId, requestBody)

Generates multiple PDFs

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var requestBody = [null]; // [Object] | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.batchGeneratePdfV1(templateId, requestBody, callback);

Parameters

Name Type Description Notes
templateId String
requestBody [Object]

Return type

[CreateSubmissionResponse]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

batchGeneratePdfs

CreateSubmissionBatchResponse batchGeneratePdfs(submissionBatchData)

Generates multiple PDFs

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var submissionBatchData = new DocSpring.SubmissionBatchData(); // SubmissionBatchData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.batchGeneratePdfs(submissionBatchData, callback);

Parameters

Name Type Description Notes
submissionBatchData SubmissionBatchData

Return type

CreateSubmissionBatchResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

combinePdfs

CreateCombinedSubmissionResponse combinePdfs(combinePdfsData)

Merge submission PDFs, template PDFs, or custom files

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var combinePdfsData = new DocSpring.CombinePdfsData(); // CombinePdfsData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.combinePdfs(combinePdfsData, callback);

Parameters

Name Type Description Notes
combinePdfsData CombinePdfsData

Return type

CreateCombinedSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

combineSubmissions

CreateCombinedSubmissionResponse combineSubmissions(combinedSubmissionData)

Merge generated PDFs together

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var combinedSubmissionData = new DocSpring.CombinedSubmissionData(); // CombinedSubmissionData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.combineSubmissions(combinedSubmissionData, callback);

Parameters

Name Type Description Notes
combinedSubmissionData CombinedSubmissionData

Return type

CreateCombinedSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

copyTemplate

Template copyTemplate(templateId, copyTemplateData)

Copy a Template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var copyTemplateData = new DocSpring.CopyTemplateData(); // CopyTemplateData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.copyTemplate(templateId, copyTemplateData, callback);

Parameters

Name Type Description Notes
templateId String
copyTemplateData CopyTemplateData

Return type

Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createCustomFileFromUpload

CreateCustomFileResponse createCustomFileFromUpload(createCustomFileData)

Create a new custom file from a cached presign upload

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var createCustomFileData = new DocSpring.CreateCustomFileData(); // CreateCustomFileData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createCustomFileFromUpload(createCustomFileData, callback);

Parameters

Name Type Description Notes
createCustomFileData CreateCustomFileData

Return type

CreateCustomFileResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createDataRequestToken

CreateSubmissionDataRequestTokenResponse createDataRequestToken(dataRequestId)

Creates a new data request token for form authentication

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var dataRequestId = drq_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createDataRequestToken(dataRequestId, callback);

Parameters

Name Type Description Notes
dataRequestId String

Return type

CreateSubmissionDataRequestTokenResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

createFolder

Folder createFolder(createFolderData)

Create a folder

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var createFolderData = new DocSpring.CreateFolderData(); // CreateFolderData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createFolder(createFolderData, callback);

Parameters

Name Type Description Notes
createFolderData CreateFolderData

Return type

Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createHTMLTemplate

PendingTemplate createHTMLTemplate(createHtmlTemplateData)

Create a new HTML template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var createHtmlTemplateData = new DocSpring.CreateHtmlTemplateData(); // CreateHtmlTemplateData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createHTMLTemplate(createHtmlTemplateData, callback);

Parameters

Name Type Description Notes
createHtmlTemplateData CreateHtmlTemplateData

Return type

PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

createPDFTemplate

PendingTemplate createPDFTemplate(templateDocument, templateName, opts)

Create a new PDF template with a form POST file upload

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateDocument = "/path/to/file"; // File | 
var templateName = "templateName_example"; // String | 
var opts = {
  'templateParentFolderId': "templateParentFolderId_example" // String | 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createPDFTemplate(templateDocument, templateName, opts, callback);

Parameters

Name Type Description Notes
templateDocument File
templateName String
templateParentFolderId String [optional]

Return type

PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

createPDFTemplateFromUpload

PendingTemplate createPDFTemplateFromUpload(createTemplateFromUploadData)

Create a new PDF template from a cached presign upload

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var createTemplateFromUploadData = new DocSpring.CreateTemplateFromUploadData(); // CreateTemplateFromUploadData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.createPDFTemplateFromUpload(createTemplateFromUploadData, callback);

Parameters

Name Type Description Notes
createTemplateFromUploadData CreateTemplateFromUploadData

Return type

PendingTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

deleteFolder

Folder deleteFolder(folderId)

Delete a folder

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var folderId = fld_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteFolder(folderId, callback);

Parameters

Name Type Description Notes
folderId String

Return type

Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

deleteTemplate

UpdateTemplateResponse deleteTemplate(templateId)

Delete a template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.deleteTemplate(templateId, callback);

Parameters

Name Type Description Notes
templateId String

Return type

UpdateTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

expireCombinedSubmission

CombinedSubmission expireCombinedSubmission(combinedSubmissionId)

Expire a combined submission

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var combinedSubmissionId = com_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.expireCombinedSubmission(combinedSubmissionId, callback);

Parameters

Name Type Description Notes
combinedSubmissionId String

Return type

CombinedSubmission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

expireSubmission

Submission expireSubmission(submissionId)

Expire a PDF submission

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var submissionId = sub_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.expireSubmission(submissionId, callback);

Parameters

Name Type Description Notes
submissionId String

Return type

Submission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

generatePDF

CreateSubmissionResponse generatePDF(templateId, submissionData)

Generates a new PDF

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var submissionData = new DocSpring.SubmissionData(); // SubmissionData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.generatePDF(templateId, submissionData, callback);

Parameters

Name Type Description Notes
templateId String
submissionData SubmissionData

Return type

CreateSubmissionResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

getCombinedSubmission

CombinedSubmission getCombinedSubmission(combinedSubmissionId)

Check the status of a combined submission (merged PDFs)

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var combinedSubmissionId = com_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getCombinedSubmission(combinedSubmissionId, callback);

Parameters

Name Type Description Notes
combinedSubmissionId String

Return type

CombinedSubmission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getDataRequest

SubmissionDataRequest getDataRequest(dataRequestId)

Look up a submission data request

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var dataRequestId = drq_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getDataRequest(dataRequestId, callback);

Parameters

Name Type Description Notes
dataRequestId String

Return type

SubmissionDataRequest

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getFullTemplate

FullTemplate getFullTemplate(templateId)

Fetch the full template attributes

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getFullTemplate(templateId, callback);

Parameters

Name Type Description Notes
templateId String

Return type

FullTemplate

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getPresignUrl

{String: Object} getPresignUrl()

Get a presigned URL so that you can upload a file to our AWS S3 bucket

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getPresignUrl(callback);

Parameters

This endpoint does not need any parameter.

Return type

{String: Object}

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getSubmission

Submission getSubmission(submissionId, opts)

Check the status of a PDF

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var submissionId = sub_000000000000000001; // String | 
var opts = {
  'includeData': true // Boolean | 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSubmission(submissionId, opts, callback);

Parameters

Name Type Description Notes
submissionId String
includeData Boolean [optional]

Return type

Submission

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getSubmissionBatch

SubmissionBatch getSubmissionBatch(submissionBatchId, opts)

Check the status of a submission batch job

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var submissionBatchId = sbb_000000000000000001; // String | 
var opts = {
  'includeSubmissions': true // Boolean | 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getSubmissionBatch(submissionBatchId, opts, callback);

Parameters

Name Type Description Notes
submissionBatchId String
includeSubmissions Boolean [optional]

Return type

SubmissionBatch

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTemplate

Template getTemplate(templateId)

Check the status of an uploaded template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTemplate(templateId, callback);

Parameters

Name Type Description Notes
templateId String

Return type

Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getTemplateSchema

{String: Object} getTemplateSchema(templateId)

Fetch the JSON schema for a template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.getTemplateSchema(templateId, callback);

Parameters

Name Type Description Notes
templateId String

Return type

{String: Object}

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listCombinedSubmissions

[CombinedSubmission] listCombinedSubmissions(opts)

Get a list of all combined submissions

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var opts = {
  'page': 2, // Number | Default: 1
  'perPage': 1 // Number | Default: 50
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listCombinedSubmissions(opts, callback);

Parameters

Name Type Description Notes
page Number Default: 1 [optional]
perPage Number Default: 50 [optional]

Return type

[CombinedSubmission]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listFolders

[Folder] listFolders(opts)

Get a list of all folders

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var opts = {
  'parentFolderId': fld_000000000000000002 // String | Filter By Folder Id
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listFolders(opts, callback);

Parameters

Name Type Description Notes
parentFolderId String Filter By Folder Id [optional]

Return type

[Folder]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubmissions

ListSubmissionsResponse listSubmissions(opts)

List all submissions

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var opts = {
  'cursor': sub_list_000012, // String | 
  'limit': 3, // Number | 
  'createdAfter': 2019-01-01T09:00:00-05:00, // String | 
  'createdBefore': 2020-01-01T09:00:00.000+0200, // String | 
  'type': test, // String | 
  'includeData': true // Boolean | 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listSubmissions(opts, callback);

Parameters

Name Type Description Notes
cursor String [optional]
limit Number [optional]
createdAfter String [optional]
createdBefore String [optional]
type String [optional]
includeData Boolean [optional]

Return type

ListSubmissionsResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listSubmissions_0

ListSubmissionsResponse listSubmissions_0(templateId, opts)

List all submissions for a given template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000002; // String | 
var opts = {
  'cursor': "cursor_example", // String | 
  'limit': 3.4, // Number | 
  'createdAfter': "createdAfter_example", // String | 
  'createdBefore': "createdBefore_example", // String | 
  'type': "type_example", // String | 
  'includeData': true // Boolean | 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listSubmissions_0(templateId, opts, callback);

Parameters

Name Type Description Notes
templateId String
cursor String [optional]
limit Number [optional]
createdAfter String [optional]
createdBefore String [optional]
type String [optional]
includeData Boolean [optional]

Return type

ListSubmissionsResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

listTemplates

[Template] listTemplates(opts)

Get a list of all templates

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var opts = {
  'query': 2, // String | Search By Name
  'parentFolderId': fld_000000000000000001, // String | Filter By Folder Id
  'page': 2, // Number | Default: 1
  'perPage': 1 // Number | Default: 50
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listTemplates(opts, callback);

Parameters

Name Type Description Notes
query String Search By Name [optional]
parentFolderId String Filter By Folder Id [optional]
page Number Default: 1 [optional]
perPage Number Default: 50 [optional]

Return type

[Template]

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

moveFolderToFolder

Folder moveFolderToFolder(folderId, moveFolderData)

Move a folder

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var folderId = fld_000000000000000001; // String | 
var moveFolderData = new DocSpring.MoveFolderData(); // MoveFolderData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.moveFolderToFolder(folderId, moveFolderData, callback);

Parameters

Name Type Description Notes
folderId String
moveFolderData MoveFolderData

Return type

Folder

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

moveTemplateToFolder

Template moveTemplateToFolder(templateId, moveTemplateData)

Move Template to folder

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000001; // String | 
var moveTemplateData = new DocSpring.MoveTemplateData(); // MoveTemplateData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.moveTemplateToFolder(templateId, moveTemplateData, callback);

Parameters

Name Type Description Notes
templateId String
moveTemplateData MoveTemplateData

Return type

Template

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

renameFolder

renameFolder(folderId, renameFolderData)

Rename a folder

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var folderId = fld_000000000000000001; // String | 
var renameFolderData = new DocSpring.RenameFolderData(); // RenameFolderData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
};
apiInstance.renameFolder(folderId, renameFolderData, callback);

Parameters

Name Type Description Notes
folderId String
renameFolderData RenameFolderData

Return type

null (empty response body)

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

testAuthentication

AuthenticationSuccessResponse testAuthentication()

Test Authentication

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.testAuthentication(callback);

Parameters

This endpoint does not need any parameter.

Return type

AuthenticationSuccessResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

updateDataRequest

UpdateDataRequestResponse updateDataRequest(dataRequestId, updateSubmissionDataRequestData)

Update a submission data request

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var dataRequestId = drq_000000000000000001; // String | 
var updateSubmissionDataRequestData = new DocSpring.UpdateSubmissionDataRequestData(); // UpdateSubmissionDataRequestData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateDataRequest(dataRequestId, updateSubmissionDataRequestData, callback);

Parameters

Name Type Description Notes
dataRequestId String
updateSubmissionDataRequestData UpdateSubmissionDataRequestData

Return type

UpdateDataRequestResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

updateTemplate

UpdateTemplateResponse updateTemplate(templateId, updateTemplateData)

Update a Template

Example

var DocSpring = require('docspring');
var defaultClient = DocSpring.ApiClient.instance;

// Configure HTTP basic authorization: api_token_basic
var api_token_basic = defaultClient.authentications['api_token_basic'];
api_token_basic.username = 'YOUR USERNAME';
api_token_basic.password = 'YOUR PASSWORD';

var apiInstance = new DocSpring.PDFApi();
var templateId = tpl_000000000000000003; // String | 
var updateTemplateData = new DocSpring.UpdateTemplateData(); // UpdateTemplateData | 
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.updateTemplate(templateId, updateTemplateData, callback);

Parameters

Name Type Description Notes
templateId String
updateTemplateData UpdateTemplateData

Return type

UpdateTemplateResponse

Authorization

api_token_basic

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json