All URIs are relative to https://us1.pdfgeneratorapi.com/api/v4
| Method | HTTP request | Description |
|---|---|---|
| createFrom | POST /forms | Create form |
| deleteForm | DELETE /forms/{formId} | Delete form |
| getForm | GET /forms/{formId} | Get form |
| getForms | GET /forms | Get forms |
| shareForm | POST /forms/{formId}/share | Share form |
| updateForm | PUT /forms/{formId} | Update form |
CreateFrom201Response createFrom(form_configuration_new)
Create form
Creates a new form based on the configuration sent in the request body.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let form_configuration_new = new PDFGeneratorAPI.FormConfigurationNew(); // FormConfigurationNew | Form configuration
apiInstance.createFrom(form_configuration_new, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| form_configuration_new | FormConfigurationNew | Form configuration |
- Content-Type: application/json
- Accept: application/json
deleteForm(form_id)
Delete form
Deletes the form with specified id
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let form_id = 1; // Number | Form unique identifier
apiInstance.deleteForm(form_id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| form_id | Number | Form unique identifier |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
CreateFrom201Response getForm(form_id)
Get form
Returns form configuration
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let form_id = 1; // Number | Form unique identifier
apiInstance.getForm(form_id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| form_id | Number | Form unique identifier |
- Content-Type: Not defined
- Accept: application/json
GetForms200Response getForms(opts)
Get forms
Returns a list of forms available for the organization
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let opts = {
'page': 1, // Number | Pagination: page to return
'per_page': 20 // Number | Pagination: How many records to return per page
};
apiInstance.getForms(opts, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| page | Number | Pagination: page to return | [optional] [default to 1] |
| per_page | Number | Pagination: How many records to return per page | [optional] [default to 15] |
- Content-Type: Not defined
- Accept: application/json
ShareForm201Response shareForm(form_id)
Share form
Creates an unique sharing URL to collect form data
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let form_id = 1; // Number | Form unique identifier
apiInstance.shareForm(form_id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| form_id | Number | Form unique identifier |
- Content-Type: Not defined
- Accept: application/json
CreateFrom201Response updateForm(form_id, form_configuration_new)
Update form
Updates the form configuration. The form configuration must be complete as the entire configuration is replaced and not merged.
import PDFGeneratorAPI from 'pdf-generator-api-client';
let defaultClient = PDFGeneratorAPI.ApiClient.instance;
// Configure Bearer (JWT) access token for authorization: JSONWebTokenAuth
let JSONWebTokenAuth = defaultClient.authentications['JSONWebTokenAuth'];
JSONWebTokenAuth.accessToken = "YOUR ACCESS TOKEN"
let apiInstance = new PDFGeneratorAPI.FormsApi();
let form_id = 1; // Number | Form unique identifier
let form_configuration_new = new PDFGeneratorAPI.FormConfigurationNew(); // FormConfigurationNew | Form configuration
apiInstance.updateForm(form_id, form_configuration_new, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});| Name | Type | Description | Notes |
|---|---|---|---|
| form_id | Number | Form unique identifier | |
| form_configuration_new | FormConfigurationNew | Form configuration |
- Content-Type: application/json
- Accept: application/json