The logiform REST API facilitates access to your forms and form submission data. You can get information about the forms within your account and import and export records including uploaded attachments. This API is intended for web developers.
Our API uses simple URLs and all interactions with the API is restricted to a secure connection using TLS to safeguard data contents, and all requests are authenticated using HTTP. All request and response content is formatted using JSON, including error information.
The sample code included with our API docs all use CURL. For information about installing CURL for testing and some of the things to watch out for on windows (HINT: there are a lot of gotchas on windows with CURL!), see Installing and using cURL from the Zendesk support site that includes download links for CURL.
Logiforms customers can enable API access via the Account Management screen. Once enabled, an API key will be provided. This API key must be included with each request in the Authorization Header. All requests to our API are authenticated using HTTP Basic Authentication. To authenticate, you provide your API key key in the HTTP Authorization
header.
Using the curl command line tool, you set this header using the -u
flag, followed by the word 'apikey', the ":" character and then your API Key. This is the same as providing an Authorization Header with the username 'apikey' and the password being your API Key. For example:
curl -u apikey:{your_key} https://forms.logiforms.com/api/1.0/form/
By default, the submission endpoints (when returning form submission records) return a maximum of 100 records per page.
When the response exceeds 100 records, you can paginate through the records by incrementing the page parameter.
Example: page=3. The result data include next_page
,current_page
and total_pages
in the response body that you can use to
iterate over the pages.
{
{
"data": {
"records": [....],
"record_count": 133,
"next_page": 2,
"current_page": 1,
"total_pages": 2
},
"error": "",
"success": true
}
Our API uses a date format based on UTC format (ISO 8601). When providing dates for filtering ranges of data, no timezone offset needs to be specified, the timezone of the form (as set in language & locale settings) is automatically used.
YYYY-MM-DDT12:00:00
logiforms responds to successful requests with an HTTP status code of 200.
All endpoints that do not stream a file back, return a JSON
Object with a data
property containing
the returned data or information
about the operation, an error
property, describing any errors (or an empty string when no errors have occurred) and a success
property with a value
of true for successfully completed requests or false when an error has occurred.
Status: 200 OK
{
"data": [....],
"error": "",
"success": true
}
Status: 420
{
"data":{},
"error": "Non HTTPS request. This API only accepts requests via HTTPS",
"success": false
}
When returning data from the via and of the data endpoints, fieldnames containing spaces or non ASCII characters are returned with the spaces removed and non-ASCII characters removed. For example, if you
have a field with the name First Name (of Student)
, this fieldname will be returned as FirstNameofStudent
.
The logiforms API uses standard HTTP status codes in addition to the JSON return object that includes more detailed error messages.
Code | Description |
---|---|
200 | The request completed successfully |
400 | Unable to Complete the Request - The returned JSON will contain the error message |
401 | Unauthorized - Invalid API key or no API access enabled for the account |
404 | Not Found - The resource requested could not be found |
405 | Method Not Allowed - The requested method does not exist |
420 | Non HTTPS request - All requests must be made over SSL |
429 | Too Many Requests - The current user has hit the daily rate limit |
500 | Internal Server Error - An error occurred while processing the request |
Forms are used to collect user input and can also be used as repository data for dynamic lookups and workflows. Through the API you get a list of all available forms within your account, or query for the details of a particular form. As of this version (1.1) you can not create new forms or delete forms etc. This functionality is being considered for a future release. If you are interested in this functionality, Let us know
https://forms.logiforms.com/api/1.0/form/
Get all of the forms within your account.
curl https://forms.logiforms.com/api/1.0/form/ \
-u apikey:{your_key}
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
includeViews | Boolean | No | false | Include Form Views |
Status: 200 OK
{
"data": {
"form_count": 2,
"forms": [
{
"submissions": 1,
"locale": "English (US)",
"name": "2015 Quest Camp",
"project_id": 300000,
"id": 300498,
"formtype": "multipage form",
"datecreated": "February, 12 2015 10:41:13",
"url": "http://forms.logiforms.com/formdata/user_forms/60000_6449748/300498/",
"lang": "english",
"project_name": "Sample Project",
"secure": 0
},
{
"submissions": 116,
"locale": "English (US)",
"name": "ABN ACN Testing",
"project_id": 300000,
"id": 300354,
"formtype": "multipage form",
"datecreated": "October, 29 2013 11:47:47",
"url": "https://forms.logiforms.com/formdata/user_forms/60000_6449748/300354/",
"lang": "English",
"project_name": "Sample Project",
"secure": 1
}
]
},
"error": "",
"success": true
}
}
https://forms.logiforms.com/api/1.0/form/{form_id}
Return the description and meta data for a single form.
curl https://forms.logiforms.com/api/1.0/form/{form_id} \
-u apikey:{your_key}
Status: 200 OK
{
"data": {
"form": {
"submissions": 1,
"locale": "English (US)",
"name": "Adobe Form Central PDF1",
"project_id": 300000,
"id": 300489,
"formtype": "pdfform",
"datecreated": "February, 05 2015 11:41:46",
"url": "http://localhost//formdata/user_forms/60000_6449748/300489/",
"lang": "English",
"project_name": "Sample Project",
"secure": 0
}
},
"error": "",
"success": true
}
Fields define the individual fields on your form and include system fields like the users IP, record_id and datesubmitted among others. Fields have both a name and a unique ID. Typically, you will use the field name when interacting via the API (this is the default), however, you may also wish to use the unique field ID. If you want to use the field ID, use the methods described below to get an array of field objects that describe the field name, id and other properties.
https://forms.logiforms.com/api/1.0/form/{form_id}/fields
Return an array of field objects. Includes both static elements (headers, buttons etc) and data fields
curl https://forms.logiforms.com/api/1.0/form/{form_id}/fields \
-u apikey:{your_key}
Status: 200 OK
{
"data": {
"fields": [
{
"isStatic": false,
"name": "RecordID",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "record_id",
"dbtype": "INTEGER",
"caption": "Record ID",
"sys": true,
"id": "record_id",
"options": "",
"type": "sysfield"
},
{
"isStatic": false,
"name": "DateSubmitted",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "datesubmitted",
"dbtype": "DATETIME",
"caption": "DateSubmitted",
"sys": true,
"id": "datesubmitted",
"options": "",
"type": "sysfield"
},
{
"isStatic": false,
"name": "LFUUID",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "lfuuid",
"dbtype": "IDSTAMP",
"caption": "LFUUID",
"sys": true,
"id": "lfuuid",
"options": "",
"type": "sysfield"
},
{
"isStatic": false,
"name": "GEO from location",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "geo_from",
"dbtype": "VARCHAR",
"caption": "GEO FROM",
"sys": true,
"id": "geo_from",
"options": "",
"type": "sysfield"
},
{
"isStatic": false,
"name": "GEO Longitude",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "geo_longitude",
"dbtype": "VARCHAR",
"caption": "GEO Longitude",
"sys": true,
"id": "geo_longitude",
"options": "",
"type": "sysfield"
},
{
"isStatic": false,
"name": "GEO Latitude",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "geo_latitude",
"dbtype": "VARCHAR",
"caption": "GEO Latitude",
"sys": true,
"id": "geo_latitude",
"options": "",
"type": "sysfield"
},
/* additional system fields not shown) */
{
"isStatic": false,
"name": "Company",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "TextField",
"dbtype": "VARCHAR",
"sys": false,
"id": "field_1427868695653_5",
"options": [],
"hasAttachment": false,
"type": "field"
},
{
"isStatic": false,
"name": "First Name",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "TextField",
"dbtype": "VARCHAR",
"sys": false,
"id": "field091",
"options": [],
"hasAttachment": false,
"type": "field"
},
{
"isStatic": true,
"name": "Buttons",
"defaultvalue": "",
"sys": false,
"id": "btn54259",
"encrypted": "",
"fieldclass": "ButtonSet",
"options": [],
"dbtype": "NONE",
"type": "button"
},
{
"isStatic": false,
"name": "Email Address",
"defaultvalue": "",
"encrypted": false,
"fieldclass": "TextField",
"dbtype": "VARCHAR",
"sys": false,
"id": "field645",
"options": [],
"hasAttachment": false,
"type": "field"
}
]
},
"error": "",
"success": true
}
Form submission data can be accessed via the api and returned as an array of record objects. New form submission records can also be created, updated and deleted via the API.
https://forms.logiforms.com/api/1.0/form/{form_id}/data
Get form submission data in an array of objects format. This method uses #Pagination and returns 100 records per page.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data \
-u apikey:{your_key}
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
startID | integer | No | 0 | The record_id to start returning records from. 0 to start at the first record. | |||||||||||||||||||||||||||
endID | integer | No | 0 | The record_id to end at. 0 to return all records. | |||||||||||||||||||||||||||
startDate | String | No | UTC format start date. 2015-07-02T20:30:00 | ||||||||||||||||||||||||||||
endDate | String | No | UTC formatted end date 2015-07-02T20:30:00 | ||||||||||||||||||||||||||||
dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. | |||||||||||||||||||||||||||
includeSysFields | String | No | basic | Return system fields. Use basic,extended or none to limit the set of system fields returned. | |||||||||||||||||||||||||||
includeBase64 | Boolean | No | false | Return all file attachments, including generated PDF's in base64 encoded format. When true, the base64 encoded file is returned in a field named
'[fieldname]_base64' and the filename is returned in in the [fieldname] property. For example, if your form has a field named 'PDF' that contains a PDF document,
the results would include {"PDF":"leaseAgreement.pdf","PDF_base64":"JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC9UeXBl......"} |
|||||||||||||||||||||||||||
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments and response data. When this is true, all references to fields should be by ID. | |||||||||||||||||||||||||||
fieldlist | String | No | A comma delimited list of field names (or ID's if indexByID=true) to return. When not provided, all fields are returned. | ||||||||||||||||||||||||||||
private_key | String | No | The account private key. When provided, if there is encrypted data in the result set, then it is decrypted and returned. | ||||||||||||||||||||||||||||
sortBy | String | No | record_id | The field name (or ID if indexByID=true) to sort the results by. | |||||||||||||||||||||||||||
sortOrder | String | No | ASC | The sort order, can be ASC or DESC. | |||||||||||||||||||||||||||
page | String | No | 1 | The page of data to return when more than one page of data is available. See #Pagination | |||||||||||||||||||||||||||
[Field Name] | String|Number | No |
Additional custom query string arguments can be provided to filter the data returned. Filter data using any of the form field names and the operators defined in the table below. The operator should
be included immediately before the value, and directly after the = in the query string parameter. You can also use matchtype=OR|AND to control how
your query string filters are combined. The matchtype applies to all custom query string filters.
|
||||||||||||||||||||||||||||
j_destform | Number | No | The ID of the form you would like to JOIN and pull data from within the result set. This property is required when doing a JOIN. | ||||||||||||||||||||||||||||
j_destfield1 | String | No | The name of the field in the JOINED data source (defined by j_destform) used as the relational key. This property is required when doing a JOIN. | ||||||||||||||||||||||||||||
j_sourcefield1 | String | No | The name of the field in the primary data source. The value in this field will be used to look up the related record in the j_destform via the j_destfield1 field). For example, to get child records from a subform, you would set this property to "record_id" and set the j_destfield1 property to the "ParentRecordID_for_SubForm". This would return all of the child rows from the subform. This property is required when doing a JOIN. | ||||||||||||||||||||||||||||
j_destsortfield | String | No | The name of the field to sort the child records by. | ||||||||||||||||||||||||||||
j_destsortdir | String | No | 'DESC' or 'ASC'. The sort direction of the child rows. | ||||||||||||||||||||||||||||
j_destfieldlist | String | No | The list of field names to return from the joined data source. This property is required when doing a JOIN. | ||||||||||||||||||||||||||||
j_overwrite | Boolean | No | This property determines how to handle fields in the j_destfieldlist that have the same name as fields found in the fieldlist property (or any field when fieldlist is not defined). When setting this to 'false' and the same field name exists in the primary data set returned, the field name will be prefixed with "join_[fieldname]". If j_overwrite is 'true', the returned field will overwrite any primary fields being returned that have the same name. | ||||||||||||||||||||||||||||
j_matchtype | String | No | Joined data can be filtered in the same way the parent data set is filtered by using query string arguments prefixed with "j_[fieldname]". This property defines if the query statement will use 'AND' or 'OR' when joining query values.
For example, you could limit the joined data to only records where the province = 'BC' and the lastmodified date is greater than '2022-07-03' by providing the following query string arguments:
|
||||||||||||||||||||||||||||
auditlog | Boolean | No | false | Set this to true to return a log of changes made to each record. When enabled, each record will contain a history of changes in the auditlog property. Defaults to false. | |||||||||||||||||||||||||||
auditlogStartDate | String | No | UTC format start date. 2015-07-02T20:30:00. Only audit log entries with the changes made after this date are returned. | ||||||||||||||||||||||||||||
auditlogEndDate | String | No | UTC formatted end date 2015-07-02T20:30:00. Only audit log entries with the changes made before this date are returned. | ||||||||||||||||||||||||||||
auditlogLookup | string/JSON | No | JSON encoded object that defines a filter to be applied to the audit log results. Only audit log changes that match this filter
will be returned. Use this argument to return, for example, only records where the "Status" field was changed to "Pending" and the "Order Type"
field was changed (to any value). Note that only simple comparison operators are supported and date evaluation is not supported here
|
Status: 200 OK
{
"data": {
"record_count": 3,
"next_page": "",
"records": [
{
"Company": "Serial Systems",
"Food": "Pop Corn",
"Comments": "",
"lfuuid": "D5592511-1F79-475E-A08A-AD02044F37D5",
"Product": "Widgets",
"Status": "Archived",
"CustomerID": 1,
"datesubmitted": "2015-04-05T00:23:55",
"RecordID": 48,
"COST": 1200,
"City": "user123123451"
},
{
"Company": "ABC Co",
"Food": "Pizza,Pop Corn",
"Comments": "",
"lfuuid": "960268AE-CB86-4AB9-9ADA-D38D027637D7",
"Product": "Desk",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T14:51:10",
"RecordID": 49,
"COST": 100,
"City": "user"
},
{
"Company": "Zenith Technologies",
"Food": "",
"Comments": "",
"lfuuid": "0CA3A3A8-ECFB-490D-A1A2-982D8B5CF951",
"Product": "Widgets",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T15:08:13",
"RecordID": 50,
"COST": 99,
"City": "Winnipeg"
}
],
"current_page": 1,
"total_pages": 1
},
"error": "",
"success": true
}
When the optional argument, auditlog=true is provided, each record will contain an auditlog array which describes each set of changes made to the record
Status: 200 OK
{
"data": {
"record_count": 3,
"next_page": "",
"records": [
{
"Company": "Serial Systems",
"Food": "Pop Corn",
"Comments": "",
"lfuuid": "D5592511-1F79-475E-A08A-AD02044F37D5",
"Product": "Widgets",
"Status": "Archived",
"CustomerID": 1,
"datesubmitted": "2015-04-05T00:23:55",
// when auditlog=true, each record will contain an array of changeset objects
"auditlog": [
{
"updates": {
"Status": [
"Active",
"Archived"
],
"Comments": [
"",
"Shipped!"
],
},
"eventid": "w",
"descript": "Update via Workflow Trigger",
"modifiedby": "",
"datemodified": "April, 26 2019 10:51:02",
"ip": "192.168.30.254"
}
],
"RecordID": 48,
"COST": 1200,
"City": "user123123451"
},
{
"Company": "ABC Co",
"Food": "Pizza,Pop Corn",
"Comments": "",
"lfuuid": "960268AE-CB86-4AB9-9ADA-D38D027637D7",
"Product": "Desk",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T14:51:10",
// when auditlog=true, each record will contain an array of changeset objects
"auditlog": [
{
"updates": {
"Status": [
"Active",
"Cancelled"
],
"Comments": [
"",
"Customer cancelled and was refunded"
],
},
"eventid": "w",
"descript": "Update via Workflow Trigger",
"modifiedby": "",
"datemodified": "April, 25 2019 06:51:02",
"ip": "192.168.30.254"
}
],
"RecordID": 49,
"COST": 100,
"City": "user"
},
{
"Company": "Zenith Technologies",
"Food": "",
"Comments": "",
"lfuuid": "0CA3A3A8-ECFB-490D-A1A2-982D8B5CF951",
"Product": "Widgets",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T15:08:13",
"auditlog": [],
"RecordID": 50,
"COST": 99,
"City": "Winnipeg"
}
],
"current_page": 1,
"total_pages": 1
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}
Get a specific form submission record by record_id
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id} \
-u apikey:{your_key}
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
includeSysFields | String | No | basic | Return system fields. Use basic,extended or none to limit the set of system fields returned. | ||||||||||||||||||||||||
includeBase64 | Boolean | No | false | Return all file attachments, including generated PDF's in base64 encoded format. When true, the base64 encoded file is returned in a field named
'[fieldname]_base64' and the filename is returned in in the [fieldname] property. For example, if your form has a field named 'PDF' that contains a PDF document,
the results would include {"PDF":"leaseAgreement.pdf","PDF_base64":"JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC9UeXBl......"} |
||||||||||||||||||||||||
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments and response data. When this is true, all references to fields should be by ID. | ||||||||||||||||||||||||
fieldlist | String | No | A comma delimited list of field names (or ID's if indexByID=true) to return. When not provided, all fields are returned. | |||||||||||||||||||||||||
private_key | String | No | The account private key. When provided, if there is encrypted data in the result set, then it is decrypted and returned. | |||||||||||||||||||||||||
dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. | ||||||||||||||||||||||||
auditlog | Boolean | No | false | Set this to true to return a log of changes made to each record. When enabled, each record will contain a history of changes in the auditlog property. Defaults to false. | ||||||||||||||||||||||||
auditlogStartDate | String | No | UTC format start date. 2015-07-02T20:30:00. Only audit log entries with the changes made after this date are returned. | |||||||||||||||||||||||||
auditlogEndDate | String | No | UTC formatted end date 2015-07-02T20:30:00. Only audit log entries with the changes made before this date are returned. | |||||||||||||||||||||||||
auditlogLookup | string/JSON | No | JSON encoded object that defines a filter to be applied to the audit log results. Only audit log changes that match this filter
will be returned. Use this argument to return, for example, only records where the "Status" field was changed to "Pending" and the "Order Type"
field was changed (to any value). Note that only simple comparison operators are supported and date evaluation is not supported here
|
Status: 200 OK
{
"data": {
"record": {
"Company": "Zenith Technologies",
"Food": "",
"Comments": "",
"lfuuid": "0CA3A3A8-ECFB-490D-A1A2-982D8B5CF951",
"Product": "Widgets",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T15:08:13",
"RecordID": 50,
"COST": 99,
"City": "Winnipeg"
}
},
"error": "",
"success": true
}
Status: 200 OK
{
"data": {
"record": {
"Company": "Zenith Technologies",
"Food": "",
"Comments": "",
"lfuuid": "0CA3A3A8-ECFB-490D-A1A2-982D8B5CF951",
"Product": "Widgets",
"Status": "New",
"CustomerID": 2,
"datesubmitted": "2015-04-06T15:08:13",
"RecordID": 50,
"COST": 99,
"City": "Winnipeg",
// when auditlog=true, the response will contain an array of changeset objects
"auditlog": [
{
"updates": {
"Status": [
"Active",
"Cancelled"
],
"Comments": [
"",
"Customer cancelled and was refunded"
],
},
"eventid": "w",
"descript": "Update via Workflow Trigger",
"modifiedby": "",
"datemodified": "April, 25 2019 06:51:02",
"ip": "192.168.30.254"
}
],
}
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/attachments
Download/Stream file uploads, PDF and inline signature images. This endpoint will return a zip file of all media associated with a set of records or a single file if only 1 file exists in the result set. The data is streamed directly back to the client.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/attachments \
-u apikey:{your_key}
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
startID | integer | No | 0 | The record_id to start returning records from. 0 to start at the first record. |
endID | integer | No | 0 | The record_id to end at. 0 to return all records. |
auditlogStartDate | String | No | UTC format start date. 2015-07-02T20:30:00 | |
auditlogEndDate | String | No | UTC formatted end date 2015-07-02T20:30:00 | |
dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. |
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments and response data. When this is true, all references to fields should be by ID. |
fieldlist | String | No | A comma delimited list of field names (or ID's if indexByID=true) to return. This list is expected to be a list of fields that store media (ie. PDFs, signatures and uploads). When not provided, all attachment data is returned. |
https://forms.logiforms.com/api/1.0/form/{form_id}/data/
Create a new form submission record. When the new record is created, the form's autoresponders, and notifications are triggered in the same manner as when a new form submission is received. For forms that use the save & finish later feature, new entries are always set to 'completed'.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/ \
-u apikey:{your_key} -X POST \
-H "Content-Type: application/json" \
-d '{"name":"James","email":"james@logiforms.com","address":"123 West Ed"}'
To upload files via the API, provide the file in Base64 encoded format. To specify the filename of the Base64 encoded file, provide it in a second argument based on the original fieldname followed by "_filename. For example, if you had a field named "PDF" and wanted to upload a PDF with the name "LeaseAgreement.pdf" you would provide the following arguments {"PDF":"JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC9UeXBl......","PDF_filename":"leaseAgreement.pdf"}
Arguments, including form field values, can be provided as a JSON formatted object in the body of the request or as form fields. When providing JSON encoded values in the request body, the Content-Type
header must be set to 'application/json'
.
Note, that the individual form fields are not shown in this table and are specific to your form.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments. When this is true, all references to fields should be by ID. |
Status: 200 OK
{
"data": {
"lfuuid": "9a93416a-e4e3-4004-b413-7650cce7793f",
"record_id": 100
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}
Update an existing submission record.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id} \
-u apikey:{your_key} -X POST \
-H "Content-Type: application/json" \
-d '{"name":"James","email":"james@logiforms.com","address":"123 West Ed","sendEmails":"false","runTriggers":"false"}'
To upload files via the API, provide the file in Base64 encoded format. To specify the filename of the Base64 encoded file, provide it in a second argument based on the original fieldname followed by "_filename. For example, if you had a field named "PDF" and wanted to upload a PDF with the name "LeaseAgreement.pdf" you would provide the following arguments {"PDF":"JVBERi0xLjUKJeLjz9MKMSAwIG9iago8PC9UeXBl......","PDF_filename":"leaseAgreement.pdf"}
. To remove an existing file provide a blank value.
Arguments, including form field values, can be provided as a JSON formatted object in the body of the request or as form fields. When providing JSON encoded values in the request body, the Content-Type
header must be set to 'application/json'
.
Note, that the individual form fields are not shown in this table and are specific to your form.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments. When this is true, all references to fields should be by ID. |
runTriggers | Boolean | No | true | Execute any triggers associated with this form when updating the record |
doPDFGeneration | Boolean | No | true | Do PDF generation (PDF Profiles must have updates enabled in order to qualify for execution) |
sendEmails | Boolean | No | true | Send autoresponder and notification emails configured to run in update mode / respondent update mode |
Status: 200 OK
{
"data": {
"lfuuid": "9a93416a-e4e3-4004-b413-7650cce7793f",
"record_id": 100
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}
Delete an existing submission record.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id} \
-u apikey:{your_key} -X DELETE
Status: 200 OK
{
"data": {
"record_id": 100,
"recordsdeleted": 1
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/delete/
Delete a range of records by ID or datesubmitted range. To delete a single record, see #Delete Single Record
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/delete/ \
-u apikey:{your_key} -X POST \
-d '{"startID": 1,"commit": false,"endID": 100}'
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
commit | String | No | false | Set this to true to commit the delete. Leave it to false to return a count of how many records would be deleted without doing the delete. Use this option to preview the delete prior to performing it. |
startID | integer | No | 0 | The record_id to start deleting records from. 0 to start at the first record. |
endID | integer | No | 0 | The record_id to end at. 0 to specify the end row |
startDate | String | No | UTC format start date. 2015-07-02T20:30:00. Records after this date will be deleted. | |
endDate | String | No | UTC formatted end date 2015-07-02T20:30:00. Records before this date will be deleted. |
Status: 200 OK
{
"data": {
"rowsPendingDelete": 5
},
"error": "",
"success": true
}
Status: 200 OK
{
"data": {
"rowsdeleted": 5
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/audit
Get audit log entries (changes) for all records of a form. Only records with changes are returned. This endpoint accepts all of the same arguments as the Get Submissions endpoint to filter the records returned. Additionally, it accepts a number of arguments to filter and limit the audit log data. The Get Submissions endpoint can also be used with auditlog=true to return full records AND their auditlog entries. The difference is that this endpoint will only return records that a) have changes and b) that match any of the audit log filtering arguments. The Get Submissions endpoint will always return all records (limited by any filtering arguments) and does not restrict results based on audit log results.
curl https://forms.logiforms.com/api/1.0//form/{form_id}/audit \
-u apikey:{your_key} -X GET
This endpoint accepts all of the same arguments as the Get Submissions endpoint to filter the records returned, and the optional arguments defined below:
Name | Type | Required | Default | Comment | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. | ||||||||||||||||||||||||
includerecord | Boolean | No | false | Set this to true to include the entire record aswell as the audit log data. When this is false, only the recordID and lfuuid are returned for each record. Defaults to false. | ||||||||||||||||||||||||
auditlogStartDate | String | No | UTC format start date. 2015-07-02T20:30:00. Only records with the changes made after this date are returned. | |||||||||||||||||||||||||
auditlogEndDate | String | No | UTC formatted end date 2015-07-02T20:30:00. Only records with the changes made before this date are returned. | |||||||||||||||||||||||||
auditlogLookup | string/JSON | No | JSON encoded object that defines a filter to be applied to the audit log results. Only records that have changes that match this filter
will be returned. Use this argument to return, for example, only records where the "Status" field was changed to "Pending" and the "Order Type"
field was changed (to any value). Note that only simple comparison operators are supported and date evaluation is not supported here
|
The response data is an array of record objects, by default the recordID and lfuuid are the only two fields of record data returned. The auditlog key contains an array of changeset objects. Each changeset object includes an 'updates' object, indexed by field name (or fieldID when indexByID=true) with the changes made to that field in a 1-dimensional array. The original value is in the 1st position, and the new/changed value is in the 2nd position.
Status: 200 OK
{
"data": {
"current_page": 1,
"total_pages": 1,
"records": [
{
"lfuuid": "DF19182A-49B4-471B-9306-209BB58A73CB",
"auditlog": [
{
"updates": {
"Cover Page PDF": [
"",
"cover_20170426_105103792.pdf"
],
"Application PDF Form": [
"",
"Application_20170426_105104322.pdf"
]
},
"eventid": "w",
"descript": "Update via Workflow Trigger",
"modifiedby": "",
"datemodified": "April, 26 2017 10:51:02",
"ip": "192.168.30.254"
}
],
"RecordID": 1
},
{
"lfuuid": "291377B0-81FB-4A09-A54A-E6AE37F9895F",
"auditlog": [
{
"updates": {
"Labels": [
"",
"Follow Up"
],
"FullName": [
"",
"Joseph M Howell"
],
"Cover Page PDF": [
"",
"cover_20180524_191648907.pdf"
]
},
"eventid": "u",
"descript": "Updated by \"demo@logiforms.com\"",
"modifiedby": "",
"datemodified": "May, 24 2018 19:16:48",
"ip": "192.168.30.254"
}
],
"RecordID": 97
},
{
"lfuuid": "F95047AF-F9E7-4C46-B550-00CFCE6396D1",
"auditlog": [
{
"updates": {
"Quote": [
"",
"Quote98.pdf"
],
"Labels": [
"",
"Closed"
],
"FullName": [
"",
"Louise S Gray"
],
"Cover Page PDF": [
"",
"cover_20180524_191642996.pdf"
]
},
"eventid": "u",
"descript": "Updated by \"demo@logiforms.com\"",
"modifiedby": "",
"datemodified": "May, 24 2018 19:16:42",
"ip": "192.168.30.254"
}
],
"RecordID": 98
}
],
"record_count": 3,
"next_page": ""
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/audit/{record_id}
Get audit log entries (changes) for a single record. This method returns the audit log for a single record. It does not return any of the record data fields.
curl https://forms.logiforms.com/api/1.0//form/{form_id}/audit/{record_id} \
-u apikey:{your_key} -X GET
Name | Type | Required | Default | Comment | dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments and response data. When this is true, all references to fields should be by ID. | ||||||||||||||||||||||||
auditlogStartDate | String | No | UTC format start date. 2015-07-02T20:30:00. Only records with the changes made after this date are returned. | |||||||||||||||||||||||||
auditlogEndDate | String | No | UTC formatted end date 2015-07-02T20:30:00. Only records with the changes made before this date are returned. | |||||||||||||||||||||||||
auditlogLookup | string/JSON | No | JSON encoded object that defines a filter to be applied to the audit log results. Only audit log changes that match this filter
will be returned. Use this argument to return, for example, only audit log entries where the "Status" field was changed to "Pending" and the "Order Type"
field was changed (to any value). Note that only simple comparison operators are supported and date evaluation is not supported here
|
The response data is an array of changeset objects. Each changeset object includes a 'updates' object, indexed by field name (or fieldID when indexByID=true) with the changes made to that field in a 1-dimensional array. The original value is in the 1st position, and the new/changed value is in the 2nd position.
Status: 200 OK
{
"data": [
// start the first changeset
{
"updates": {
"Status": [
"Approved", //original value
"Processed" // changed to
]
},
"eventid": "x",
"descript": "Updated by Remote API Call",
"modifiedby": "",
"datemodified": "August, 29 2019 08:49:06",
"ip": "203.52.228.193"
},
// start the second changeset
{
"updates": {
"OrderShipped": [
"", //original value
"08/25/2019" // changed to
],
"IsValid": [
"", //original value
"Y" // changed to
]
},
"eventid": "p",
"descript": "Updated via Workflow",
"modifiedby": "",
"datemodified": "August, 20 2019 13:04:24",
"ip": "203.52.228.193"
}
],
"error": "",
"success": true
}
Our API makes it easy to export form submission data in the same format that the data can be exported from the WEB UI. You can stream an excel or CSV file that includes the form submission data for a selected range. To return an array of record objects see the Get Submissions method. This Export endpoints allow you to specify the format for the export or use an existing Export Profile. Export Profiles can only be created via the WEB UI. This endpoint does not return file attachments. To download attachments use the Get Attachments/Files method instead.
https://forms.logiforms.com/api/1.0//form/{form_id}/data/export/profiles
Get an array of Export profiles objects. Export profiles can be created within the Export module of the WEB UI. Export profiles can be used when running an export via the API instead of manually specifying the arguments. Export profiles can also be used to configure advanced filters, column sort order and other properties that can not be specified via the export endpoint.
curl https://forms.logiforms.com/api/1.0//form/{form_id}/data/export/profiles \
-u apikey:{your_key}
Status: 200 OK
{
"data": {
"profile_count": 1,
"profiles": [
{
"profile_id": 300003,
"form_id": 300599,
"filename": "logiformsExport",
"order": "form",
"csv_qualifier": "\"",
"fieldmap": [
{
"enabled": true,
"remapname": "DateSubmitted",
"id": "datesubmitted"
},
{
"enabled": true,
"remapname": "RecordID",
"id": "record_id"
},
{
"enabled": true,
"remapname": "LFUUID",
"id": "lfuuid"
},
{
"enabled": true,
"remapname": "City",
"id": "field810"
},
{
"enabled": true,
"remapname": "Country",
"id": "field670"
},
{
"enabled": true,
"remapname": "Province/State",
"id": "field589"
},
{
"enabled": true,
"remapname": "Registration Date",
"id": "field_1435893614374_6"
},
{
"enabled": true,
"remapname": "Next Class Date",
"id": "field_1435896701503_7"
},
{
"enabled": true,
"remapname": "Comments",
"id": "field_1436217147534_8"
}
],
"csv_delimiter": ",",
"profilename": "Last 30 Days Export ",
"format": "excel",
"viewid": 1,
"includeSysFields": "basic",
"presetfilter": "30days",
"filterdata": {
"matchtype": "All",
"filterarray": [],
"custom": ""
}
}
]
},
"error": "",
"success": true
}
https://forms.logiforms.com/api/1.0/form/{form_id}/data/export
Export Data from a forms database and stream a CSV or EXCEL file back to the client.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/export \
-u apikey:{your_key}
Arguments should be provided as query string parameters.
Name | Type | Required | Default | Comment | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
profile_id | integer | No | The ID of an export profile to use when exporting data. When provided, the other arguments are ignored. Use #Get Export Profiles to look up available export profiles. | ||||||||||||||||||||||||||||
startID | integer | No | 0 | The record_id to start returning records from. 0 to start at the first record. | |||||||||||||||||||||||||||
endID | integer | No | 0 | The record_id to end at. 0 to return all records. | |||||||||||||||||||||||||||
startDate | String | No | UTC format start date. 2015-07-02T20:30:00 | ||||||||||||||||||||||||||||
endDate | String | No | UTC formatted end date 2015-07-02T20:30:00 | ||||||||||||||||||||||||||||
dateFiltering | String | No | date | When set to 'datetime' both the date and the time (HH:MM:SS) are used when filtering by date ranges. When set to 'date' (the default), only the DD:MM:YY part are used when filtering. Default to false. | |||||||||||||||||||||||||||
includeSysFields | String | No | basic | Return system fields. Use basic,extended or none to limit the set of system fields returned. | |||||||||||||||||||||||||||
indexByID | Boolean | No | false | Use field ID's instead of names in request arguments and response data. When this is true, all references to fields should be by ID. | |||||||||||||||||||||||||||
fieldlist | String | No | A comma delimited list of field names (or ID's if indexByID=true) to return. When not provided, all fields are returned. | ||||||||||||||||||||||||||||
private_key | String | No | The account private key. When provided, if there is encrypted data in the result set, then it is decrypted and returned. | ||||||||||||||||||||||||||||
filename | String | No | logiformsExport | The file name of the exported file. Do not include the file extension, this is added dynamically based on the return format requested. | |||||||||||||||||||||||||||
format | String | No | excel | The export file format. Either CSV or EXCEL | |||||||||||||||||||||||||||
csv_delimiter | String | No | , | The CSV delimiter character. Only applicable when format = CSV | |||||||||||||||||||||||||||
csv_qualifier | String | No | " | The CSV text qualifier character. Only applicable when format = CSV | |||||||||||||||||||||||||||
presetfilter | String | No | A preset filter used to determin the range of data to export. Applicable values are
|
||||||||||||||||||||||||||||
[Field Name] | String|Number | No |
Additional custom query string arguments can be provided to filter the data returned. Filter data using any of the form field names and the operators defined in the table below. The operator should
be included immediately before the value, and directly after the = in the query string parameter. You can also use matchtype=OR|AND to control how
your query string filters are combined. The matchtype applies to all custom query string filters.
|
Use the import methods to load your Excel
or CSV
file directly into your form database.
https://forms.logiforms.com/api/1.0/form/{form_id}/data/import
This method works in the same was as the WEB UI's import module. You provide a file upload to the endpoint and include additional arguments as form field values. This endpoint uses the multipart post method to complete the upload.
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/import \
-u apikey:{your_key} \
-F "file=@/home/user1/Desktop/myImport.xlsx" \
-F "remapArray=[[\"city\",\"city\"],[\"Name\",\"Full Name\"]]" \
-F "excel_worksheet=ImportTestData1"
In the above example, the JSON encoded remapArray
has the '"' character escaped by a backslash. For more information on using CURL see Installing and using cURL from the ZenDesk Support Site.
Arguments must be provided as either query string parameters or as urlencoded form values. The file being uploaded must be provided as a file upload form field.
JSON
encoded arguments are not supported by this endpoint.
Name | Type | Required | Default | Comment |
---|---|---|---|---|
file | multipart/form-data | Yes | This is the file being uploaded. Note, this is not a standard argument, and must be provided as a file upload. | |
remapArray | JSON | Yes | This is a JSON encoded array of arrays that indicate how the columns in the imported file should be mapped to the fields in your form's database.
Note that, if the indexByID argument is true, the destination columns should be specified by ID. A list of available fields for a given form can be returned
by using the Get Fields endpoint.
The first position of each child array is the source column name and the second position is the destination column.
|
|
indexByID | Boolean | No | false | When this is true, the remapArray should include references to field ID's instead of field names. |
updateMode | String | No | insert | The import mode. Appicable values are:
|
excel_worksheet | String | No | Sheet1 | The sheet name of the excel file to import. Only applicable for EXCEL imports. |
userdelimiter | String | No | , | The CSV delimiter character used in the uploaded file. Only applicable for CSV imports. |
usertextqualifier | String | No | " | The CSV text qualifier character used in the uploaded file. Only applicable for CSV imports. |
filtersourcefield | String | Required when updateMode=updateOnly|updateAndInsert | The name of the source column in the import file to compare to the filterdestinationfield to determine a match. |
|
filteroperator | String | Required when updateMode=updateOnly|updateAndInsert | The operator for the match filter. Possible values are '=,<>,>,<'. | |
filterdestinationfield | String | Required when updateMode=updateOnly|updateAndInsert | The name,(or ID when indexByID=true), of the destination column/field to compare the filtersourcefield to determine a match. |
The response includes the number of rows inserted, updated and any failed rows.
Status: 200 OK
{
"data":{
"duplicatesSkipped":0,
"totalRowsFailed":0,
"totalRowsProcessed":5,
"unmatchedRows":0,
"totalRecordsUpdated":0,
"totalNewRecordsAdded":5
},
"error":"",
"success":true
}