logiforms API 1.0

Introduction

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.

Authentication

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/

Working with Dates

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.

Example Date Format
YYYY-MM-DDT12:00:00

Response Format

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.

Example Success Response
Status: 200 OK

{
 "data": [....],
  "error": "",
  "success": true
}
Example Response with Errors
Status: 420

 {
  "data":{},
  "error": "Non HTTPS request. This API only accepts requests via HTTPS",
  "success": false
}

Field Names

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.

Error Codes

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

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

Get All Forms GET https://forms.logiforms.com/api/1.0/form/

Get all of the forms within your account.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/ \
-u apikey:{your_key}
Example Response
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
}
}
Get A Single Form GET https://forms.logiforms.com/api/1.0/form/{form_id}

Return the description and meta data for a single form.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id} \
-u apikey:{your_key}
Example Response
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

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.

Get Fields GET 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

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/fields \
-u apikey:{your_key}
Example Response
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
}

Submission Data

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.

Get Submissions GET 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.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data \
-u apikey:{your_key}
Arguments

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
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
Example Response
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
}
Get a Single Record GET https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}

Get a specific form submission record by record_id

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id} \
-u apikey:{your_key}
Arguments

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.
Example Response
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
}
Get Attachments/Files GET 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.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/attachments \
-u apikey:{your_key}
Arguments

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
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.
Create new Record POST 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'.

Using Curl
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"}'
Uploading Files

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

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.
Example Response
Status: 200 OK

{
   "data": {
      "lfuuid": "9a93416a-e4e3-4004-b413-7650cce7793f",
      "record_id": 100
   },
   "error": "",
   "success": true
}
Update a Record POST https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}

Update an existing submission record.

Using Curl
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"}'
Uploading Files

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

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
Example Response
Status: 200 OK

{
   "data": {
      "lfuuid": "9a93416a-e4e3-4004-b413-7650cce7793f",
      "record_id": 100
   },
   "error": "",
   "success": true
}
Delete a Record DELETE https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id}

Delete an existing submission record.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/{record_id} \
-u apikey:{your_key} -X DELETE
Example Response
Status: 200 OK

{
   "data": {
      "record_id": 100,
      "recordsdeleted": 1
   },
   "error": "",
   "success": true
}
Delete Multiple Records POST 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

Using Curl
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

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.
Example Response with commit=false
Status: 200 OK

{
   "data": {
      "rowsPendingDelete": 5
   },
   "error": "",
   "success": true
}
Example Response with commit=true
Status: 200 OK

{
   "data": {
      "rowsdeleted": 5
   },
   "error": "",
   "success": true
}

Export

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.

Get Export Profiles GET 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.

Using Curl
curl https://forms.logiforms.com/api/1.0//form/{form_id}/data/export/profiles \
-u apikey:{your_key}
Example Response
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
}
Export CSV or Excel GET 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.

Using Curl
curl https://forms.logiforms.com/api/1.0/form/{form_id}/data/export \
-u apikey:{your_key}
Arguments

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
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
  • '24hours' : Submissions from the last 24 hours
  • 'today' : Submissions from today
  • '1week' : Submissions from the last 7 days
  • '2week' : Submissions from the last 14 days
  • 'month' : Current calendar month's submissions
  • 'lastmonth' : Last calendar month's submissions
  • '30days' : The Last 30 days of submissions

Importing Data

Use the import methods to load your Excel or CSV file directly into your form database.

Importing a CSV or Excel POST 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.

Using Curl
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

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.
[
  ["city","travelCity"],  // Map 'city' to form field 'travelCity'
  ["name","customerName"] // Maps 'name' to form field 'customerName'
]
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:
  • insert: Insert new rows only
  • updateOnly : Update matching rows only. When using this mode, the filtersourcefield , filteroperator and filterdestinationfield arguments must be provided in order to determine matches.
  • updateAndInsert: Update matching rows and insert new rows where no match is found. When using this mode, the filtersourcefield , filteroperator and filterdestinationfield arguments must be provided in order to determine matches.
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.
Example Response

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
}