Finally, the right tool for qualified developers

There is no other form editor
that gives you so much power, period.
 
 
 
 

Introduction

ActiveForms API lets you easily control every aspect of your ActiveForms account. With simple API calls you can:

  • Obtain and manage entries
  • Manage your forms
  • Use Single sing-on to FormBuilder - see details
  • Generate PDF printouts
  • Manage your account

Complete list of API functions can be found in tabs on the left.

Data format and protocol

ActiveForms API ist RESTful, which means we serve XML files over HTTPS protocol. All requests are sent to URL like https://api.activeforms.com/4.0/RESOURCE/ACTION

For example, we have /form/list or /printout/create actions.

Important remarks:

  • Whole communication goes in UTF-8.
  • All requests can be sent as GET or POST - they are handled the same way.
  • Values of request parameters must be URL-encoded

Date format

In ActiveForms we have to types of date values:

  • Values of form fields
  • Values of metadata - like entry submit timestamp

Values of date fields of forms are sent in the format that is setup in the field configuration.

Values of metadata are always sent as

[YYYY]-[MM]-[DD]T[hh]:[mm]:[ss].[ms][Z]

where

  • [YYYY] is year
  • - is a constant separator
  • [MM] is month (from 01 to 12)
  • [DD] is day of month (from 01 to 31)
  • T is constant separator
  • [hh] is hour (from 00 to 23)
  • : is a constant separator
  • [mm] is minute (from 00 to 59)
  • [ss] is second (from 00 to 59)
  • . (dot) is a constant separator
  • [ms] is miliseconds (from 000 to 999)
  • Z is timezone
Using Java SimpleDateFormat pattern, our format is
yyyy-MM-dd'T'HH:mm:ss.SSSZ

Sample valid dates are:

  • 2008-01-01T00:00:00.000+0000
  • 1981-01-26T08:16:32.324+0100
  • 2006-12-28T12:55:12.232-0230

API Versions

ActiveForms API is versioned. Today we use version 4.0 and this is the version we recommend for new users.

Authentication

Every request is authenticated. See details at authentication page.

How to start?

Writing an ActiveForms client is very simple. Once you connect and call one function, you could use all the other functions the same way. Here we will show you how perform the very basic operation - how to retrieve entries from your form.

There are 2 functions for gaining Entry data:

  • /entry/list to get list of entries
  • /entry/download to get data of specfied entry
The first function returns only entry headers - data about entry identifier, timstamp, applicant IP and so on. The second functions gives you full data from the form fields.

If you want to get entries list, you simply create a HTTP request on https://api.activeforms.com/4.0/entry/list

Of course, this will not work until you send some more parameters - who you are and what exactly do you need. Request and all its parameters can be send by GET or POST method, so use what you like.

So, the first three parameters you have to add are used for authentication - so that we could be sure that you are allowed to get the data: apiKey, apiTimestamp, apiSig. Detailed description of authentication algorithm can be found here.

Having these 3 parameters, your API call is ready! If you send a request like

  https://api.activeforms.com/4.0/entry/list?apiKey=imU6gm4OfLdRcFLO&apiTimestamp=2012-08-30T15%3A07%3A59.352%2B0200&apiSig=356993a2c157a33739840ae1f60068724bff7925

you will get all your entries in an easy-to-parse XML file. If you want to somehow narrow this list, use additional, optional parameters like formCode, apiFromDate or apiToDate - see full documentation of /entry/list function.

All the other functions work this way - you send a simple HTTP request with a bunch of parameters and you get an XML file. Enjoy!

 
 

API Authentication

Every request to ActiveForms API is authenticated. Authentication is the very first step of request processing and if it fails, an authentication error is returned.

In order to properly build request to ActiveForms API, you have to know 3 values:

  • API key
  • Secret API key
  • Current timestamp

API key is a constant value, unique for each ActiveForms account. It can be found in the application in Settings module. You can treat it as your account login.

Secret API key is also a constant value. Unlike API Key, the Secret API Key is secret and cannot be known to any third-parties. Security of ActiveForms integration depends on how secret is your Secret API Key.

Current timestamp contains the moment of requesting to API. When verifying the request, ActiveForms checks if passed value is not youger or older than current server date more than 15 minutes.

Authentication of API request is based on passing 3 values:

  • apiKey - your API Key
  • apiTimestamp - Current timestamp
  • apiSig - request signature

The apiSig parameter is a request signature. Value of this parameter is generated upon HTTP request and a value of your Secret API Key. There is no possibility to generate valid apiSig when you don't know Secret API Key. And without valid apiSig, the request will be immidiately denied.

Algorithm for generating valid apiSig stands as follows:

    • Concatenate followig strings
    • Request url
      • Protocol ("https://")
      • API domain ("api.activeforms.com")
      • API version number ("/4.0")
      • resource ("/entry/list")
    • API Key
    • Current timestamp
    • API Secret key
  • Convert this value to lowercase
  • Compute SHA-1 digest
  • Convert it to HEX

Additional Remarks:

  • String that is used to compute SHA-1 digest is NOT previosly URL-encoded
  • Request URL does not contain port number

Example:

For request:

https://api.activeforms.com/4.0/form/list
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T13:34:21.870+0200

If API Secret Key is ashee9OoYengeesu, the apiSig is computed this way:

1. Concatenated string is https://api.activeforms.com/4.0/form/listimU6gm4OfLdRcFLO2012-08-09T13:34:21.870+0200ashee9OoYengeesu
2. Converted to lowercase:
https://api.activeforms.com/4.0/form/listimu6gm4ofldrcflo2012-08-09t13:34:21.870+0200ashee9ooyengeesu
3. SHA-1 digest in HEX is 05b6b9401f3c5edf588cd93d1a37dbda452db43e

So value of apiSig parameter is 05b6b9401f3c5edf588cd93d1a37dbda452db43eand complete request URL is:

https://api.activeforms.com/4.0/form/list/
	apiKey=imU6gm4OfLdRcFLO
	apiTimestamp=2012-08-09T13%3A34%3A21.870%2B020
	apiSig=05b6b9401f3c5edf588cd93d1a37dbda452db43e
 
 

Create new form

Creates a new form

URL: https://api.activeforms.com/4.0/form/create

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormName An internal name for the new form. This name is seen only by administrators. Required
apiFormUrl An URL for the new form. New form will be available under https://activeforms.com/clientcode/apiFormUrl. Required
apiSourceFormCode Code of the form that will be used as source. A new form is created by cloning a draft version of specified form

Sample query

https://api.activeforms.com/4.0/form/create
	apiFormName = Contact%20Form
	apiFormUrl = contact
	apiKey = imU6gm4OfLdRcFLO
	apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
	apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDataList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
    <formData
            name="Contact form"
            code="ghwywg9vna3oll3o"
            url="contact"
            languageCode="english-1"
            accessType="public"
            status="inactive"
            creationDate="2012-08-09T15:20:56.285+0200"
            isPrintable="false"
            draftLocked="false"
    />
</formDataList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains only one element - the new form.

Get list of forms

Returns list of forms

URL: https://api.activeforms.com/4.0/form/list

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Form code. If passed, only specified forms are returned.
apiExecutionRigour Strictness of API call. In 'strict' mode, when a form with given formCode was not found, an exception would be thrown. In 'lenient' mode, the form just does not appears on the list.
Allowed values: strint, lenient
Default value: strict

Sample query

https://api.activeforms.com/4.0/form/list
    apiFormCode = 83m2qfssmq6jn8rv
    apiFormCode = cv4vvdonbjjn2adm
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDataList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
    <formData
            name="Contact form"
            code="83m2qfssmq6jn8rv"
            url="contact"
            languageCode="english-1"
            accessType="public"
            status="active"
            creationDate="2012-06-05T09:50:34.069+0200"
            isPrintable="true"
            draftLocked="false"
    />
    <formData
            name="Satisfaction survey"
            code="cv4vvdonbjjn2adm"
            url="survey"
            languageCode="english-1"
            accessType="public"
            status="inactive"
            creationDate="2012-06-14T14:37:10.122+0200"
            isPrintable="false"
            draftLocked="false"
    />
</formDataList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Every formData element represents one form.

Update form setup

Updates form settings

URL: https://api.activeforms.com/4.0/form/update

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Identifies the form to be changed. Required
apiFormUrl A new URL for the new form.
apiFormAccessType A new access mode for the form.
apiFormAuthenticationKey Secret authentication key for authorizedOnly access type.
Allowed values: from 12 up to 20 letters and/or digits.
Required if apiFormAccessType is set to auhtorizedOnly

Sample query

https://api.activeforms.com/4.0/form/update
    apiFormCode=ydq2kz9jrhnydjl3
    apiFormAccessType=authorizedOnly
    apiFormAuthenticationKey=myverysecretkey
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDataList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
    <formData
             name="Contact form"
             code="ghwywg9vna3oll3o"
             url="contact"
             languageCode="english-1"
             accessType="public"
             status="inactive"
             creationDate="2012-08-09T15:20:56.285+0200"
             isPrintable="false"
             draftLocked="false"
    />
</formDataList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains only one element - the edited form.

Delete form

Deletes a form. Deletes all its form defininitions and all entries created with this form.

URL: https://api.activeforms.com/4.0/form/delete

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Code of the form to be deleted. Required

Sample query

https://api.activeforms.com/4.0/form/delete
    apiFormCode=ydq2kz9jrhnydjl3
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns HTTP Status 204 with empty body

Get form access tokens

Returns list of access tokens for single-signOn to the form

URL: https://api.activeforms.com/4.0/form/accessTokens

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Code of the form for which tokens will be returned Required
apiTokensAmount Number of tokens that will be returned

Sample query

https://api.activeforms.com/4.0/form/accessTokens
    apiFormCode=ydq2kz9jrhnydjl3
    apiTokensAmount=1000
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formAccessTokens apiVersion="4.0" formCode="i618ns4nhtytybhy" xmlns="http://api.activeforms.com/4.0">
    <token value="pais3cal8ooXio6eu7ae"/>
    <token value="iefohNg2reiDao7joaph"/>
    <token value="Eth9oay3ailoh3cobah7"/>
    <token value="Thohh9she8Go0shoothu"/>
</formAccessTokens>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains only one element - the edited form.
 
 

Get list of form definitions

Returns list of form definitions (releases) of a form

URL: https://api.activeforms.com/4.0/formDefinition/list

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Code of the form which definitions will be returned Required

Sample query

https://api.activeforms.com/4.0/formDefinition/list
  apiFormCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-05T10:24:15.359+0200"
    description=""
    code="864qr6dgez97jq4r"
    name="Initial release"
    status="inactive"/>
  <formDefinitionInfo
    creationDate="2012-06-05T09:50:34.069+0200"
    description=""
    code="267be6be62909ae4"
    name="Draft"
    printoutTemplateCode="peiZaijazeim1oow"
    status="draft"/>
  <formDefinitionInfo
    creationDate="2012-06-14T09:54:20.867+0200"
    description="new fields added"
    code="ci45pr9h2tmhkbp5"
    name="1.1"
    printoutTemplateCode="OowahMiedeihaa5y6"
    status="inactive"/>
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes" 
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Download form definition

Returns structure of form definition. Depending on apiFormDefinitionDownloadFormat parameter, method returns either simplified information about form fields, or a full form definition.

URL: https://api.activeforms.com/4.0/formDefinition/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition Required
apiFormDefinitionDownloadFormat Format of a returned form definition.
Allowed values: basic, full
Default value: basic

Sample query

https://api.activeforms.com/4.0/formDefinition/download
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f
  apiFormDefinitionDownloadFormat=basic

Sample response for a 'basic' format:

<?xml version="1.0" encoding="UTF-8"?>
<formDefinition apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <basicFormDefinition
    creationDate="2012-08-10T14:11:51.560+0200"
    description=""
    code="a5ikh9hjhgio03tg"
    name="Initial release"
    status="inactive"
    printoutTemplateCode="IsHCBdwNzBqYDHx5Tvlv">
    <page title="Page 1">
      <box header="Box 1">
        <field
          code="first_name"
          type="singleLineText"
          label="First name"
          isRequired="true"
          isExported="true"
          maxLength="100"
          isNumeric="false"/>
        <field
          code="last_name"
          type="singleLineText"
          label="Last name"
          isRequired="true"
          isExported="true"
          maxLength="100"
          isNumeric="false"/>
        <field
          code="date_of_birth"
          type="date"
          label="Date of birth"
          isRequired="false"
          isExported="true"
          dateFormat="yyyy-MM-dd"/>
      </box>
    </page>
  </basicFormDefinition>

If a parameter 'apiFormDefinitionDownloadFormat' has value 'basic', response is valid against form-create-schema.xsd (wchich includes a common XSD file).

If a parameter 'apiFormDefinitionDownloadFormat' has value 'full', response is a ZIP file containing all information about the whole form definition: structure of fields, conditional logic, layout, printout etc.

Import form definition

Createas a new form definition upon an uploaded form definition file.

URL: https://api.activeforms.com/4.0/formDefinition/import

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Code of the form, to which a definition is added. Required
apiFormReleaseName Name for the imported form definition. Required
apiFormReleaseDescription Optional release description
apiUserLogin Identifier of a user that performs operation.

Sample query

https://api.activeforms.com/4.0/formDefinition/import
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f
  apiFormCode=dmwm349dffgsld
  apiFormReleaseName=3.23
  apiFormReleaseDescription=Last%20modifications%20in%20layout
  apiUserLogin=larry

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Remarks

  • Form definition file must be sent as a request content.
  • Format of the file must be exactly the same as returned by formdefinition/download method in a 'full' mode.
  • Response contains a form definition in simple format - the one that was imported.

Activate release

Changes status of specified release to Active. If another version of a form is active, it is deactivated.

URL: https://api.activeforms.com/4.0/formDefinition/activateRelease

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition Required

Sample query

https://api.activeforms.com/4.0/formDefinition/activateRelease
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains only one form definition - the one that was activated.

Deactivate release

Changes status of specified release to Inactive.

URL: https://api.activeforms.com/4.0/formDefinition/deactivateRelease

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition Required

Sample query

https://api.activeforms.com/4.0/formDefinition/deactivateRelease
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="inactive"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains only one form definition - the one that was deactivated.

Delete form definition

Deletes specified form definition

URL: https://api.activeforms.com/4.0/formDefinition/delete

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition Required

Sample query

https://api.activeforms.com/4.0/formDefinition/delete
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns HTTP status 204 with empty body.

Release draft

Creates a new release by copying current draft of the form. New release get status 'inactive'

URL: https://api.activeforms.com/4.0/formDefinition/releaseDraft

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the draft form definition to be released. Required
Allowed values: Specified form definition must be in 'draft' status
apiUserLogin Identifier of a user that performs operation.
apiFormReleaseName Name of the new release Required
apiFormReleaseDescription Optional description of the new release

Sample query

https://api.activeforms.com/4.0/formDefinition/releaseDraft
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiUserLogin=wawrzek
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains only one form definition - the one that was created.

Update draft

Copies whole specified form definition to draft. Current draft is completely overwritten.

URL: https://api.activeforms.com/4.0/formDefinition/updateDraft

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiSourceFormDefinitionCode Code of the form definition to be copied into draft Required
Allowed values: Specified form definition must be in the same form as draft that is copied into.
apiDraftFormDefinitionCode Code of the draft form definition to be changed. Required
Allowed values: Specified form definition must be in 'draft' status
apiUserLogin Identifier of a user that performs operation.

Sample query

https://api.activeforms.com/4.0/formDefinition/updateDraft
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiUserLogin=wawrzek
  apiSourceFormDefinitionCode=yrjb3xks5fe2181l
  apiDraftFormDefinitionCode=tiNei6gahchoo6ai
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l"
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains only one form definition - the draft that was updated.

Attach printout template

Links a printout template to form definition. From now on all printouts of entries from this form definition will be generated with specified printout template.

URL: https://api.activeforms.com/4.0/formDefinition/attachPrintoutTemplate

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition. Required
apiPrintoutTemplateCode Code of the printout template that is attached. If parameter has empty value, printout template is unlinked from form definition Required
apiPrintoutContentType Printout content type. All printouts generated from this form definition will have specifed format. Allowed values are:
  • application/vnd.oasis.opendocument.text
  • application/vnd.oasis.opendocument.spreadsheet
  • application/msword
  • application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • application/vnd.ms-excel
  • application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • application/pdf
Default value: application/pdf

Sample query

https://api.activeforms.com/4.0/formDefinition/attachPrintoutTemplate
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiPrintoutTemplateCode=seiwutheizoow6Ab
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f
  apiPrintoutContentType=application%2Fpdf

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <formDefinitionInfo
    creationDate="2012-06-14T09:55:05.040+0200"
    description="minor changes"
    code="yrjb3xks5fe2181l" 
    name="1.2"
    printoutTemplateCode="peiZaijazeim1oow"
    status="active"/>
</formDefinitionList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains only one form definition - the one that was linked.

Validate form definition

Validates form definition against form integrity rules. Returns list of errors found in form definition structure. Should be called, when operations like formdefinition/createRelease returns error.

URL: https://api.activeforms.com/4.0/formDefinition/validate

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition. Required

Sample query

https://api.activeforms.com/4.0/formDefinition/validate
  apiFormDefinitionCode=83m2qfssmq6jn8rb
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formDefinitionValidationInfo apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
 TODO
</formDefinitionValidationInfo>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Response contains list of errors found in the form definition.

Lock FormBuilder - Single SingOn

Locks FormBuilder for specified form definition and returns SSO token to enter FormBuilder.

URL: https://api.activeforms.com/4.0/formDefinition/lockFormBuilder

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Code of the form. If passed, whole form is locked (with all its releases) Required if apiFormDefinitionCode is not passed
apiFormDefinitionCode Code of the form definition. If passed, only specified form definition is locked. If both apiFormCode and apiFormDefinitionCode are passed, an error is thrown. Required if apiFormCode is not passed
apiUserLogin Identifier of user that locks FormBuilder. Needed so that nobody but him could get into FormBuilder.
apiCloseURL URL for exit button - linking back to your application Required
apiCallbackUrl URL of your application for session heartbeat. FormBuilder periodically sends requests to this address so that user session in your application would not expire. Required
apiSessionLifetime Session length in miliseconds - for how long is FormBuilder locked in case of no activity from user Required
apiUpperBarStyle CSS style for upper bar of FormBuilder - see more about FormBuilder SSO
apiCustomJsCode Custom JavaScript code embedded in FormBuilder - see more about FormBuilder SSO
apiUserName Name of user that locks FormBuilder - presented in top-right corner of FormBuilder

Sample query

https://api.activeforms.com/4.0/formDefinition/lockFormBuilder
  apiUserLogin=wawrzek
  apiSessionLifetime=7200000
  apiCloseUrl=https%3A%2F%2Fmyapp.com
  apiCallbackUrl=https%3A%2F%2Fmyapp.com%2Fcallback
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<lockFormBuilderData
  apiVersion="4.0"
  token="ZYNHZFAWUnADVjaftEFD"
  url="https://fb1.activeforms.com"
  responseCode="goAhead"
  xmlns="http://api.activeforms.com/4.0"
/>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Attribute responseCode tells you if entering FormBuilder is currently possible. Possible values are goAhead, formBlocked and accessDenied
  • If its value is goAhead, user can be redirected to FormBuilder - see more about FormBuilder SSO
  • Attribute token contains one-time token for SSO
  • blockingUserLogin and blockingUserName contain login and name of user that blocked FormBuilder - if responseCode was formBlocked

Unlock FormBuilder

Unlocks FormBuilder for specified form definition - see more about FormBuilder SSO

URL: https://api.activeforms.com/4.0/formDefinition/unlockFormBuilder

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormDefinitionCode Code of the form definition. Required

Sample query

https://api.activeforms.com/4.0/formDefinition/unlockFormBuilder
  apiFormDefinitionCode=noijsccdjhvr0jj3
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<lockFormBuilderData
  apiVersion="4.0"
  token="ZYNHZFAWUnADVjaftEFD"
  url="https://fb1.activeforms.com"
  responseCode="goAhead"
  xmlns="http://api.activeforms.com/4.0"
/>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Returns HTTP status 204 with empty body.
 
 

Download form statistics

Returns statistics for specified form for a period of time

URL: https://api.activeforms.com/4.0/formStatistics/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Form code. Required
apiFromDate Beginning of the period for statistics Required
Allowed values: Valid date in common ActiveForms date format
apiToDate End of the period for statistics Required
Allowed values: Valid date in common ActiveForms date format
apiFormStatisticsType Flag indicating how detailed statistics is needed: simple (only basic data for the whole form) or detaild (data for particular pages and fields)
Allowed values: simple,
Default value: simple

Sample query

https://api.activeforms.com/4.0/formStatistics/download
  apiFormCode=83m2qfssmq6jn8rd
  apiFromDate=2012-06-05T09%3A50%3A34.069%2B0200
  apiToDate=2012-07-05T09%3A50%3A34.069%2B0200
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<formStatistics
  formCode="8b8q4tchb0dayss1"
  formName="Nateo"
  formUrl="pompyciepla"
  date="2012-08-09T07:55:42.367+0200"
  escapeTimeMedian="36"
  escapeValidationErrorsMedian="0.0"
  numberOfInvalid="671"
  submitTimeMedian="83"
  submitValidationErrorsMedian="0.081"
  visitsAll="4917"
  visitsStarted="574"
  visitsSubmitted="295"
  computationDate="2012-08-09T04:05:03.987+0200"
  conversionRate="0.0599959306418895721435546875"
  bounceRate="0.883262157440185546875"
  xmlns="http://api.activeforms.com/4.0">
  
  <pageStatistics
    numberOfVisits="4917"
    numberOfVisits_started="563"
    numberOfVisits_submitted="295"
    pageNumber="1"
    pageType="page"
    validationErrorsMedian="0.0"
    visitLengthMedian="82.9355932203389869528109556995332241058349609375"
    />
   
  <fieldStatistics
    fieldCode="Telefon"
    pageNumber="1"
    exitsNumber="1"
    validationErrorsNumber="403"
    validationRate="0.9950617283950617"
    exitRate="0.0035842293906810036"/>
   
  <fieldStatistics
    fieldCode="email_address"
    pageNumber="1"
    exitsNumber="1"
    validationErrorsNumber="2"
    validationRate="0.0049382716049382715"
    exitRate="0.2"/>
   
  <dayStats
    date="2012-07-14T00:00:00.000+0200"
    bounceRate="0"
    conversionRate="0"
    escapeTimeMedian="38"
    escapeValidationErrorsMedian="0"
    submitTimeMedian="113"
    submitValidationErrorsMedian="1"
    visitsAll="375"
    visitsSubmitted="10"/>
   
  <dayStats
    date="2012-07-30T00:00:00.000+0200"
    bounceRate="0"
    conversionRate="0"
    escapeTimeMedian="39"
    escapeValidationErrorsMedian="0"
    submitTimeMedian="121"
    submitValidationErrorsMedian="0"
    visitsAll="105"
    visitsSubmitted="4"/>
   
  <dayStats
    date="2012-08-03T00:00:00.000+0200"
    bounceRate="0"
    conversionRate="0"
    escapeTimeMedian="40"
    escapeValidationErrorsMedian="0"
    submitTimeMedian="53"
    submitValidationErrorsMedian="0"
    visitsAll="108"
    visitsSubmitted="8"/>
</formStatistics>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • In simple mode, element formStatistics has no children.
 
 

Get list of entries

Returns list of entries

URL: https://api.activeforms.com/4.0/entry/list

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Form code. If passed, only entries from specified form are returned.
apiFormDefinitionCode Form definition (release) code. If passed, only entries from specified form definition are returned.
Allowed values: If apiFormCode parameter was also passed, only form definitions of specified form can be passed here.
apiEntryStatus Entry statys. If passed, only entries with specified status are returned.
Allowed values: incomplete, submitted
apiEntryCode Entry code. If not empty, only entries with specified codes are returned.
apiFromDate Start date. If passed, only entries younger than specified date are returned.
Allowed values: Valid date in common ActiveForms date format
apiToDate End date. If passed, only entries older than specified date are returned.
Allowed values: Valid date in common ActiveForms date format
apiSearchQuery Search phrase for selecting entries. Only entries with values equal to this phrase will be returned. Matching is case-insensitive.
apiLimit Amount of entries that will be returned. If not passed, default value is considered and no more entries are returned in one request.
Allowed values: Positive integer not greater than TODO
Default value: TODO
apiOffset Starting position of which apiLimit templates will be returned.
Allowed values: Positive integer
Default value: 0

Sample query

https://api.activeforms.com/4.0/entry/list
	apiKey=imU6gm4OfLdRcFLO
	apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
	apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<entriesList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <entry
	formCode="seeLae0iek1ov5oi"
	formVersionCode="Aic5aephaetiec5a"
	number="102813"
	date="2012-06-11T12:30:47.314+0200"
	status="incomplete"
	isPrintable="false"
	applicantIP="81.95.198.118"
	code="teecheezai6aL7E3dc7i"/>
  <entry
	formCode="seeLae0iek1ov5oi"
	formVersionCode="uu5kaeNe0eedaTh3"
	number="103173"
	date="2012-07-20T09:45:14.415+0200"
	status="incomplete"
	isPrintable="false"
	applicantIP="31.11.174.148"
	code="za4Quoo3ahsc4ichi4ge"/>
  <entry
	formCode="seeLae0iek1ov5oi"
	formVersionCode="uu5kaeNe0eedaTh3"
	number="103174"
	date="2012-07-20T10:06:29.930+0200"
	status="submitted"
	isPrintable="false"
	applicantIP="31.13.174.212"
	code="bae8eegh1aeX8mdn3zei"/>
  <entry
	formCode="seeLae0iek1ov5oi"
	formVersionCode="uu5kaeNe0eedaTh3"
	number="103202"
	date="2012-07-22T20:44:28.866+0200"
	status="submitted"
	isPrintable="false"
	applicantIP="178.14.197.122"
	code="MVE1Sn860Yt9e4Cw8yvF"/>
  <entry
	formCode="seeLae0iek1ov5oi"
	formVersionCode="uu5kaeNe0eedaTh3"
	number="103306"
	date="2012-07-31T20:05:42.062+0200"
	status="submitted"
	isPrintable="false"
	applicantIP="85.227.113.168"
	code="YZd2h8iZpIYLrIOVrIBn"/>
</entriesList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Entries are ordered by their creation date.

Download entry data

Returns data of specified entries

URL: https://api.activeforms.com/4.0/entry/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiEntryCode Entry code. Specifies which entries are returned. Required
apiExecutionRigour Sctrictness of API call. In 'strict' mode, when an entry with given apiEntryCode was not found, an exception would be thrown. In 'lenient' mode, the entry just does not appear on the list.
Allowed values: strict, lenient
Default value: strict

Sample query

https://api.activeforms.com/4.0/entry/download
	apiEntryCode=34tf34tw34fw45
	apiEntryCode=340fjfwdesfjsdfjsd
	apiKey=imU6gm4OfLdRcFLO
	apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
	apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<entryDataList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <entryData
    apiVersion="4.0"
    formCode="meyai4uexemoTahleiw8"
    date="2012-07-22T20:44:28.866+0200"
    status="submitted"
    number="107567"
    code="eNieshui8quahm6aa8ch"
    formVersionCode="Hee9ohgh2si8ohb3oobi">
    
      John
    
    
      Smith
    
    
      1986-07-23
    
    
      Glasgow
    
    
      Apple
      Blackberry
      Orange
    
  </entryData>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Element entryDataList contains list of entries, specified by apiEntryCode parameter
  • Element entryData contains one entry.
  • Element fieldData contains value of a field in this entry. In case of multi-value fields, like Checkbox list or Multichoice, this element can contain many values.

Delete entry

Deletes specified entries

URL: https://api.activeforms.com/4.0/entry/delete

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiEntryCode Entry code. Specified which entries will be deleted. Required
apiExecutionRigour Sctrictness of API call. In 'strict' mode, when an entry with given apiEntryCode was not found, an exception would be thrown. In 'lenient' mode, this apiEntryCode is just ignored.
Allowed values: strict, lenient
Default value: strict

Sample query

https://api.activeforms.com/4.0/entry/delete
	apiEntryCode=34tf34tw34fw45
	apiEntryCode=340fjfwdesfjsdfjsd
	apiKey=imU6gm4OfLdRcFLO
	apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
	apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns HTTP status 204 with empty body.

Create new entry

Creates new entry with 'incomplete' status

POST: https://api.activeforms.com/4.0/entry/create

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Form code. Specifies in which form entry will be created. Entry is created in the active release of the form. Required
[Field_code] Value of specified field. Parameter name must be a code of a field from an active release of specified form.
Allowed values: text no longer than 1000 characters. For fields with options (Radiobutton list, Drop-down list, Checkbox list, Multichoice), must be a value of one of the options of the field.
apiCustomData Additional data, than can be stored in ActiveForms with the entry. This data is not visible in user's browser, only through ActiveForms API.
Allowed values: Text no longer than 1000 characters

Sample query

POST https://api.activeforms.com/4.0/entry/create
  apiFormCode=23e092jd3023j
  first_name=John
  last_name=Smith
  favourite_fruit=apple
  favourite_fruit=orange
  apiCustomData=1111
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<entriesList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <entry
    formCode="seeLae0iek1ov5oi"
    formVersionCode="Aic5aephaetiec5a"
    number="102813"
    date="2012-06-11T12:30:47.314+0200"
    status="incomplete"
    isPrintable="false"
    code="teecheezai6aL7E3dc7i"/>
</entriesList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Because of possible big reuqest size, POST http method should be used
  • List contains only one element - created entry.
 
 

Download entries report

Returns report of submitted entries

URL: https://api.activeforms.com/4.0/entriesReport/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFromDate Start date. If passed, only entries younger than specified date are counted in report.
Allowed values: Valid date in common ActiveForms date format
apiToDate End date. If passed, only entries older than specified date are counted in report.
Allowed values: Valid date in common ActiveForms date format
apiFormCode Form code. If passed, only entries from specified form are counted in report.
apiLimit Amount of form reports that will be returned. If not passed, default value is considered and no more form reports are returned in one request.
Allowed values: Positive integer not greater than TODO
Default value: TODO
apiOffset Starting position of which apiLimit entries will be returned.
Allowed values: Positive integer
Default value: 0
apiOrderBy Order of returned elements
Allowed values: 'formName,asc', 'formName,desc', 'entriesCount,asc', 'entriesCount,desc'
Default value: TODO

Sample query

https://api.activeforms.com/4.0/entriesReport/download
  apiFromDate=2012-01-01T00%3A00%3A00.000%2B0200
  apiFormCode=za4Quoo3aichi4ge
  apiFormCode=lee1Shae0eeloor0
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<entriesReport
  apiVersion="4.0"
  orderBy="entriesCount,desc"
  totalEntriesCount="17"
  xmlns="http://api.activeforms.com/4.0">
  <formEntries
    entriesCount="11"
    formCode="roh8Amohyie1ohDo"
    formName="Contact form"/>
  <formEntries
    entriesCount="6"
    formCode="meezah0fa3aet5Ke"
    formName="Registration form"/>
</entriesReport>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Element entriesReport contains list of reports for the forms.
  • Element formEntries contains report for one form
 
 

Create a printout

Starts a process of generating printout for an entry

URL: https://api.activeforms.com/4.0/printout/create

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiEntryCode Code of entry to be printed. Required

Sample query

https://api.activeforms.com/4.0/printout/create
  apiEntryCode=XpIfekrVKTfjOcXmC1kv
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<printout
  apiVersion="4.0"
  contentType="application/pdf"
  fileName="job-application"
  pageNumbers=""
  printoutCode="f71a8fbf-6a82-4c9e-acd2-dd4a954e8d02"
  templateCode="migrated-48347"
  validTo="2012-08-09T13:39:50.402+0200"
  status="in_progress"
  xmlns="http://api.activeforms.com/4.0">
  <noContent/>
</printout>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Generating printouts is asynchronous. This request starts the process of generating printout.
  • Therefore, attribute 'status' has always value 'in_progress'
  • In the XML response, you get a 'printoutCode' attribute, that contains token which must be used to download a printout.
  • After a while, you can check if the printout has already been created, by calling /printout/downlaoad method - (see more about printout download)

Download a printout

Returns previously generated entry printout

URL: https://api.activeforms.com/4.0/printout/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiPrintoutCode Code of printout to download, returned previously by printout create function. Required

Sample query

https://api.activeforms.com/4.0/printout/download
  apiPrintoutCode=XpIfekrVKTfjOcXmC1kv
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<printout
  apiVersion="4.0"
  contentType="application/pdf"
  fileName="jobApplication"
  pageNumbers=""
  printoutCode="f4a5f860-f8c5-4293-9f2c-2f1ad02943f6"
  templateCode="34g34fse4fgdfgs"
  validTo="2012-08-29T09:12:56.115+0200"
  status="ready"
  xmlns="http://api.activeforms.com/4.0">
	<content>LjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0</content>
</printout>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • You can call this method only after calling /printout/create.
  • If the printout status is 'ready', XML file contains a based-64 PDF content.
  • If the printout status is 'in_progess ', printout is not ready yet and XML contains only empty 'nocontent' tag. In that case you have to repeat a call in a few seconds.
 
 

Get list of printout templates

Returns list of printout templates with information by which from definitions they are used

URL: https://api.activeforms.com/4.0/printoutTemplate/list

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiFormCode Form code. If passed, only templates attached to specified form are returned.
apiLimit Amount of templates that will be returned. If not passed, default value is considered and no more templates are returned in one request.
Allowed values: Positive integer not greater than TODO
Default value: TODO
apiOffset Starting position of which apiLimit entries will be returned.
Allowed values: Positive integer
Default value: 0

Sample query

https://api.activeforms.com/4.0/printoutTemplate/list
  apiFormCode=avsd34gv34gfw34fw34g
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<printoutTemplateList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <printoutTemplate
    activePrintoutTemplateCode="83m2qfssmq6jn8rv"
    templateFileName="job-application"
    templateType="odt"
    printoutFileName="Application for java developer"
    pagesCount="1"
    printoutsCount="3453"
    creationTimestamp="2012-06-05T09:50:34.069+0200">
    <referer formCode="wref3sefz3kjf2"
      formName="Java developer application"
      formUrl="java-developer"
      formDefinitionCode="h9kf3sefz3kjf2"
      formDefinitionName="Initial release"
      formDefinitionDescription="" />
    <referer
      formCode="wref3sefz3kjf2"
      formName="Java developer application"
      formUrl="java-developer"
      formDefinitionCode="h9kf3sefz3kjf2"
      formDefinitionName="August 2012"
      formDefinitionDescription="new job conditions" />
  </printoutTemplate>
  <printoutTemplate
    activePrintoutTemplateCode="ks42qfssmq6jn8rv"
    templateFileName="job-application"
    templateType="odt"
    printoutFileName="Application for java developer"
    pagesCount="1"
    printoutsCount="1128"
    creationTimestamp="2012-06-07T09:50:34.069+0200">
  </printoutTemplate>
</printoutTemplateList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • When requesting for printoute template list, returned elements have no 'content' element. Content of the printout (odt or ods file) can be downloaded with printoutTemplate/download request.
  • Referers contains form definitions that use this printout templates

Download printout template

Returns a printout template.

URL: https://api.activeforms.com/4.0/printoutTemplate/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiPrintoutTemplateCode Printout template code. Required

Sample query

https://api.activeforms.com/4.0/printoutTemplate/download
  apiPrintoutTemplateCode=G7sd34gv34gfw34fw34g
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<printoutTemplateList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <printoutTemplate
    activePrintoutTemplateCode="83m2qfssmq6jn8rv"
    templateFileName="job-application"
    templateType="odt"
    printoutFileName="Application for java developer"
    pagesCount="1"
    printoutsCount="3453"
    creationTimestamp="2012-06-05T09:50:34.069+0200">
    <content>JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMgMCBSL0ZpbH</content>
    <referer
      formCode="wref3sefz3kjf2"
      formName="Java developer application"
      formUrl="java-developer"
      formDefinitionCode="h9kf3sefz3kjf2"
      formDefinitionName="Initial release"
      formDefinitionDescription="" />
    <referer
      formCode="wref3sefz3kjf2"
      formName="Java developer application"
      formUrl="java-developer"
      formDefinitionCode="h9kf3sefz3kjf2"
      formDefinitionName="August 2012"
      formDefinitionDescription="new job conditions" />
  </printoutTemplate>
</printoutTemplateList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains one element - printout template specified by apiPrintoutTemplateCode
  • Returned XML contains <content> element with tempalate file, based-64.
  • Referers contain form definitions that use this printout template

Delete printout template

Deletes a printout template

URL: https://api.activeforms.com/4.0/printoutTemplate/delete

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiPrintoutTemplateCode Printout template code. Required
apiExecutionRigour Sctrictness of API call. In 'strict' mode, when a template with given apiPrintoutTemplateCode was not found, an exception would be thrown. In 'lenient' mode, this apiPrintoutTemplateCode is just ignored.
Allowed values: strict, lenient
Default value: strict

Sample query

https://api.activeforms.com/4.0/printoutTemplate/delete
  apiPrintoutTemplateCode=G7sd34gv34gfw34fw34g
  apiPrintoutTemplateCode=koy734gv34gfw34fw34g
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns HTTP status 204 with empty body.

create

Uploads a printout template.

URL: https://api.activeforms.com/4.0/printoutTemplate/create

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiPrintoutTemplateType Type of a template Required
Allowed values: odt, ods
apiPrintoutTemplateFileName Name of the uploaded file. Will be used when downloading a template through API or admin panel.
apiPrintoutFileName Name for the printout files. Will be used when downloading printouts generated with a template. Can consist $field_identifiers$, which will be replaced with field values.

Sample query

https://api.activeforms.com/4.0/printoutTemplate/create
  apiPrintoutTemplateType=odt
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<printoutTemplateList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <printoutTemplate
    activePrintoutTemplateCode="83m2qfssmq6jn8rv"
    templateFileName="job-application"
    templateType="odt"
    printoutFileName="Application for java developer"
    pagesCount="1"
    printoutsCount="3453"
    creationTimestamp="2012-06-05T09:50:34.069+0200"/> 
</printoutTemplateList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • Template file must be sent as a request content.
  • List contains one element - printout template that was just uploaded
  • Returned XML contains no <content> element.
 
 

Update error page

Uploads and updates your custom error page.

URL: https://api.activeforms.com/4.0/errorPage/update

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig

Sample query

https://api.activeforms.com/4.0/errorPage/update
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Error page must be uploaded in a request content as a ZIP file.
  • The ZIP file must contain 3 files: index.html, script.js and style.css
  • The ZIP file may contain 'misc' directory with binary files used on error page (like images)

Download error page

Returns your error page.

URL: https://api.activeforms.com/4.0/errorPage/download

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig

Sample query

https://api.activeforms.com/4.0/errorPage/download
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns a ZIP file with you errorPage
  • The ZIP contains 3 files: index.html, script.js and style.css
  • The ZIP file may contain 'misc' directory with binary files used on error page (like images).

Reset error page

Resets your error page to default.

URL: https://api.activeforms.com/4.0/errorPage/reset

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig

Sample query

https://api.activeforms.com/4.0/errorPage/reset
  apiKey=imU6gm4OfLdRcFLO
  apiTimestamp=2012-08-09T15%3A16%3A59.460%2B0200
  apiSig=dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns a ZIP file with your errorPage (the one that was just reset)
  • The ZIP contains 3 files: index.html, script.js and style.css
  • The ZIP file may contain 'misc' directory with binary files used on error page (like images)
 
 

Update account setup

Updates your ActiveForms account settings

URL: https://api.activeforms.com/4.0/account/update

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiClientName New name of your company
apiClientEmail New e-mail address of your company
apiClienSystemUrl Your new system URL. Your forms stand under https://activeforms.com/[apiClienSystemUrl]/form
apiClientTimeZone New timezone for your account

Sample query

https://api.activeforms.com/4.0/account/update
    apiClienSystemUrl=newurl
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<accountList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <accountInfo
    apiKey="iefaiDahNahgheij4sho"
    creationDate="2012-04-16T10:07:54.355+0200"
    name="zkp"
    status="active"
    systemUrl="newurl"
    timeZone="Europe/Warsaw"
    limitForms="100"
    limitEntries="10000"
/>
</accountList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains only one element - your account info.

Get account setup

Returns your ActiveForms account settings

URL: https://api.activeforms.com/4.0/account/list

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig

Sample query

https://api.activeforms.com/4.0/account/list
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Sample response

<?xml version="1.0" encoding="UTF-8"?>
<accountList apiVersion="4.0" xmlns="http://api.activeforms.com/4.0">
  <accountInfo
    apiKey="iefaiDahNahgheij4sho"
    creationDate="2012-04-16T10:07:54.355+0200"
    name="zkp"
    status="active"
    systemUrl="newurl"
    timeZone="Europe/Warsaw"
    limitForms="100"
    limitEntries="10000"
/>
</accountList>

Response is valid against form-create-schema.xsd (wchich includes a common XSD file)

Remarks

  • List contains only one element - your account info.

delete

Deletes your entire ActiveForms account. Deletes all your forms, entries and settings. This operation is irreversible.

URL: https://api.activeforms.com/4.0/account/delete

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig

Sample query

https://api.activeforms.com/4.0/account/delete
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • HTTP status 204 and empty body.

Update secret API Key

Updates API secret key for your ActiveForms account.

URL: https://api.activeforms.com/4.0/account/updateSecretKey

Query parameters

Parameter Description
apiKey Required See more
apiTimestamp
apiSig
apiSecretKey Your new API secret key Required

Sample query

https://api.activeforms.com/4.0/account/updateSecretKey
    apiSecretKey=OP6Nu2uo3ThaiZah0eiz
    apiKey = imU6gm4OfLdRcFLO
    apiTimestamp = 2012-08-09T15%3A16%3A59.460%2B0200
    apiSig = dad353c59ec45cf078c0e32ced255076045e197f

Remarks

  • Returns HTTP status 200 with empty body
 
 

Single sign-on to Form Builder

ActiveForms supports Single Sign-on (SSO) to FormBuilder. You can build your own application for managing forms and data, that only uses our Form Editor.

To do this, you have to:

  • Call an API function and retrieve SSO token
  • Redirect user to the specified URL with this token.

To obtain an SSO token, you have to call formDefinition/lockFormBuilder function. Having done this correctly, you get a response like below:

<?xml version="1.0" encoding="UTF-8"?>
<lockFormBuilderData
  apiVersion="4.0"
  token="ZYNHZFAWUnADVjaftEFD"
  url="https://fb2.activeforms.com"
  responseCode="goAhead"
  xmlns="http://api.activeforms.com/4.0"
/>

If the responseCode is goAhead, you have to redirect user to the address obtained from url attribute, this case https://fb2.activeforms.com.

You have to build a complete redirect URL as follows:

  • Address obtained from API call in url attribute
  • Parameter app with value "fb"
  • Parameter action with value "login"
  • Parameter token with value obtained from API call in token attribute

For instance, for the case above, user should be redirected to:

	https://fb2.activeforms.com?app=fb&action=login&token=ZYNHZFAWUnADVjaftEFD