Account APIs

Account APIs are a way to pull Account content into other areas of the website. 

APIs utilize special tags to instruct the system on what information to retrieve.

Learn more about APIs.

Get Account API

The Account API provides a way to get the information about the public account holder that is currently logged in.

Minimum Tag

{{ _api.account.getAccount.template('template-key') }}

API Tag Parameters

Parameter Description
template
t

Required if responseFormat is not 'data'.

The template key of the template to use.

If this is not passed when it's required then nothing will be returned. In some cases, by not passing this parameter you will get just the raw data back.

You an alternately use the short form "t" instead of "template"

Type: String

Examples:

template('template-key')
t('template-key')

 

Account Form Submissions API

The Account Form Submissions API gets the form submissions that are associated with an individual account. When you setup a form you have the option of allowing Accounts to view their form submissions. If that is turned on then the logged in Account holder is associated with that form submission and you can retrieve those form submissions with this API.

Minimum Tag

{{ _api.account.accountFormSubmissions.templateId('3') }}

Example Tags

Get submissions for a specific form

Specify the formId to limit submissions to a single form.

{{ _api.account.accountFormSubmissions.templateId('3').formId('3') }}

Limit to the 5 most recent draft submissions

You can enable saving submissions as a draft for a single form. If that's turned on then you can get submissions that are in a draft status.

{{ _api.account.accountFormSubmissions.templateId('3').limit('5').submissionStatus('draft') }}

API Tag Parameters

Parameter Description
accountId

The ID of the account to get submissions for. Defaults to the current logged in account.

Type: Integer

Default Value: The ID of current logged in account

Example:

accountId('3')

allowEditingSubmissions

Whether or not to include the "edit submission" link.

Type: String

Accepted Values: yes, no, true or false

Default Value: yes

Example:

allowEditingSubmissions('yes')

dateFormat

The date format to use for the submission date.

Type: String

Default Value: l, F j, Y

Example:

dateFormat('M).d,).Y')

field

Array of form field names to filter results by. This will limit form submissions to those that have the specified value for that field.

Type: Array

Example:

field[field_name]('FieldValue').field[field_name_2]('fieldValue2')

formId

The ID of the form to get submissions for. If not set then submissions for all forms that are associated with the account will be returned.

Type: Integer

Example:

formId('4')

getValues

Whether or not to get the submitted field values for each submissions. Defaults to 'no' to be more efficient.

Type: String

Accepted Values: yes, no, true or false

Default Value: no

Example:

getValues('yes')

limit

The number of form submissions to get.

Type: Integer

Default Value: 50

Example:

limit('20')

offset

Required

The pagination offset to get submissions for. If it's set at a value other than 0 then it will be multiplied by the limit value to get the starting record index.

Type: Integer

submissionStatus

The submission status to limit submissions by. If not set then all submission statuses are retrieved.

Type: String

Accepted Values: draft, complete

timeFormat

Required

The time format for the submission time.

Type: String

Default Value: g:i a

Example:

timeFormat('H:i')

Account Login Form API

The Account Login Form API gets the HTML for the account login form that can be embedded into a page.

Minimum Tag

{{ _api.account.loginForm.templateId('1') }}

Example Tag

Get the login form:

{{ _api.account.loginForm.templateId('1') }}

API Tag Parameters

Parameter Description
template
t

Required if responseFormat is not 'data'.

The template key of the template to use.

If this is not passed when it's required then nothing will be returned. In some cases, by not passing this parameter you will get just the raw data back.

You an alternately use the short form "t" instead of "template"

Type: String

Examples:

template('template-key')
t('template-key')

Account Register Form API

The Account Register Form API gets the HTML for the account register form that can be embedded into a page.

You must specify the id of the Account Form to use. The first step would be to create a new Account Form where the form type is "Register". After it's created you will see the form id in the right-most column when viewing the list of Account Forms.

Form templates are managed under the "Templates" tab when you are viewing the form details.  Use the "Template key" value for the template parameter.

Minimum Tag

{{ _api.account.registerForm.formId(3).template('template-name') }}

Example Tag

Get the register form:

{{ _api.account.registerForm.formId(3).template('template-name') }}

API Tag Parameters

Parameter Description
formId

Required

The ID of the Account Form to use

Type: Integer

Example:

formId(3)

template
t

Required if responseFormat is not 'data'.

The template key of the template to use.

If this is not passed when it's required then nothing will be returned. In some cases, by not passing this parameter you will get just the raw data back.

You an alternately use the short form "t" instead of "template"

Type: String

Examples:

template('template-key')
t('template-key')

This documentation is only for Aptuitiv CMS. Learn more.
Get Started With Aptuitiv