Retrieve a form

get

/api/REST/1.0/assets/form/{id}

Retrieves the form specified by the id parameter. Note: You can also retrieve a form via REST 2.0 by using the endpoint REST/2.0/assets/form/{id}.

Request

Supported Media Types
Path Parameters
Query Parameters
  • Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Form
Type: object
Title: Form
Show Source
  • True if form is archived otherwise False. This is a read-only property.
  • Read Only: true
    The date and time the form was created, expressed in Unix time.
  • Read Only: true
    The login id of the user who created the form.
  • The form's current status. Example: draft, active, or complete.
  • Read Only: true
    Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
  • The description of the form.
  • elements
    Array consisting of form elements.
  • The email address form field entity's unique identifier.
  • The asset's raw HTML content.
  • The asset's raw HTML name.
  • Read Only: true
    Id of the form. This is a read-only property.
  • Whether the form is an internal form. If true, the form is not exposed outside of Eloqua and any form submissions to this form are deleted.
  • The name of the form.
  • The permissions for the form granted to your current instance. This is a read-only property.
  • processingSteps
    A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, FormStepWebTracking, FormStepGlobalSubscribe, and FormStepSmsPhoneNumberOptInOptOut.
  • A list of the form's processing types. For example: externalEmail, externalWebsite, internallyHosted, internalAgentProxyForm.
  • The asset's main layout style.
  • The landing page id of the failed submit.
  • The asset's type in Eloqua. This is a read-only property.
  • Read Only: true
    Unix timestamp for the date and time the form was last updated.
  • Read Only: true
    The login id of the user that last updated the form.
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : processingSteps
Type: array
A list of the form's processing steps. There is no limit to the number of processing steps that can be included. Possible values include: FormStepAddToCampaign, FormStepAddToContactList, FormStepAddToDataCanvas, FormStepAddToProgram, FormStepAssociateToCampaign, FormStepCancelRegistration, FormStepUpdateContactEmailAddress, FormStepCreateUpdateEventRegistration, FormStepCreateUpdate, FormStepCreateUpdateFromFormField, FormStepGlobalSubscribe, FormStepGlobalUnsubscribe, FormStepGroupSubscription, FormStepPostData, FormStepRedirectToWebPage, FormStepRemoveFromContactList, FormStepRunIntegrationRules, FormStepSendEmail, FormStepSendNotificationEmail, FormStepWebTracking, FormStepGlobalSubscribe, and FormStepSmsPhoneNumberOptInOptOut.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
  • Read Only: true
    The date and time the form element was created, expressed in Unix time.
  • Read Only: true
    The login id of the user who created the form element.
  • The form element's current status.
  • Read Only: true
    Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
  • The description of the form element.
  • Read Only: true
    Id of the form element. This is a read-only property.
  • The form element's field instructions. Field instructions are optional instructions that help users fill in fields.
  • Name of the form element.
  • The permissions for the form element granted to your current instance.
  • The asset's main layout style.
  • The asset's type in Eloqua. This is a read-only property.
  • Read Only: true
    Unix timestamp for the date and time the form element was last updated.
  • Read Only: true
    The login id of the user that last updated the form element.
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
  • The comparator used to validate a condition. Possible values include: exactly or not exactly.
  • The form field id used to compare form fields within a form processing step condition.
  • The type of value the comparator is validating. Possible values include: 'form field' or 'static value'.
  • Read Only: true
    The date and time the form processing step was created, expressed in Unix time.
  • Read Only: true
    The login id of the user who created the form processing step.
  • The form processing step's current status.
  • Read Only: true
    Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth: minimal, partial, and complete. Any other values passed are reset to complete by default. For more information, see Request depth.
  • The description of the form processing step.
  • The conditions for which this form processing step will execute. Possible values include: always, conditionally, and never.
  • Read Only: true
    Id of the form processing step. This is a read-only property.
  • The conditions for which the processing step will execute. If yes, the processing step will execute when the conditions are met. If no, the processing step will execute when the conditions are not met.
  • Name of the form processing step.
  • The permissions for the form processing step granted to your current instance.
  • The asset's type in Eloqua. This is a read-only property.
  • Read Only: true
    Unix timestamp for the date and time the form processing step was last updated.
  • Read Only: true
    The login id of the user that last updated the form processing step.

400 Response

Bad request. See Status Codes for information about other possible HTTP status codes.

401 Response

Unauthorized. See Status Codes for information about other possible HTTP status codes.

403 Response

Forbidden. See Status Codes for information about other possible HTTP status codes.

404 Response

The requested resource was not found. See Status Codes for information about other possible HTTP status codes.

500 Response

The service has encountered an error. See Status Codes for information about other possible HTTP status codes.
Back to Top

Examples

Retrieve the form asset with Id #18:


GET /api/REST/1.0/assets/form/18
			

Response:


{
  "type": "Form",
  "currentStatus": "Draft",
  "id": "18",
  "createdAt": "1435261611",
  "createdBy": "19",
  "depth": "complete",
  "folderId": "7",
  "name": "Test Form",
  "permissions": "fullControl",
  "updatedAt": "1435261612",
  "updatedBy": "19",
  "archived": "false",
  "elements": [
    {
      "type": "FormField",
      "id": "174",
      "name": "Email Address",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100001",
      "dataType": "text",
      "displayType": "text",
      "fieldMergeId": "1",
      "htmlName": "emailAddress",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "175",
      "name": "Submit",
      "style": "{\"submitButtonStyleType\":\"standard\",\"submitButtonWidthStyle\":\"100px\",\"submitButtonHeightStyle\":\"24px\"}",
      "dataType": "text",
      "displayType": "submit",
      "htmlName": "submit",
      "validations": [
        
      ]
    }
  ],
  "emailAddressFormFieldId": "174",
  "html": "<div><form method=\"post\" name=\"UntitledForm-1534799851226\" action=\"https://s238011564.t.eloqua.com/e/f2\" onsubmit=\"return handleFormSubmit(this)\" id=\"form63\" class=\"elq-form\" ><input value=\"UntitledForm-1534799851226\" type=\"hidden\" name=\"elqFormName\"  /><input value=\"238011564\" type=\"hidden\" name=\"elqSiteId\"  /><input name=\"elqCampaignId\" type=\"hidden\"  /><div id=\"formElement0\" class=\"sc-view form-design-field sc-static-layout item-padding sc-regular-size\" ><div class=\"field-wrapper\" ></div><div class=\"individual field-wrapper\" ><div class=\"_100 field-style\" ><p class=\"field-p\" ><label for=\"field0\" class=\"label-position top \" >Email Address</label><input id=\"field0\" name=\"emailAddress\" type=\"text\" value=\"<eloqua type='emailfield' syntax='EmailAddress' />\" class=\"field-size-top-large\"  /></p></div></div></div><div id=\"formElement1\" class=\"sc-view form-design-field sc-static-layout item-padding sc-regular-size\" ><div class=\"field-wrapper\" ></div><div class=\"individual field-wrapper\" ><div class=\"_100 field-style\" ><p class=\"field-p\" ><input type=\"submit\" value=\"Submit\" class=\"submit-button\" style=\"font-size: 100%; height: 24px; width: 100px\"  /></p></div></div></div></form><script src=\"https://img03.en25.com/i/livevalidation_standalone.compressed.js\" type=\"text/javascript\" ></script><style type=\"text/css\" media=\"screen\" >.elq-form .loader{ vertical-align: middle; display: inline-block; margin-left:10px; border: 3px solid #f3f3f3;  border-radius: 50%;  border-top: 3px solid #3498db;  width: 20px;  height: 20px;  -webkit-animation: spin 2s linear infinite; animation: spin 2s linear infinite;}\n@-webkit-keyframes spin {  0% { -webkit-transform: rotate(0deg); }  100% { -webkit-transform: rotate(360deg); } }\n@keyframes spin {  0% { transform: rotate(0deg); }  100% { transform: rotate(360deg); }}\n.LV_validation_message{ font-weight:bold; margin: 0 0 0 5px; }\n.LV_valid{ color:#00CC00; display:none; }\n.LV_invalid{ color:#CC0000; font-size:10px; }\n.LV_valid_field, input.LV_valid_field:hover, input.LV_valid_field:active, textarea.LV_valid_field:hover, textarea.LV_valid_field:active { outline: 1px solid #00CC00; }\n.LV_invalid_field, input.LV_invalid_field:hover, input.LV_invalid_field:active, textarea.LV_invalid_field:hover, textarea.LV_invalid_field:active { outline: 1px solid #CC0000; }</style><script type=\"text/javascript\" >var dom0 = document.querySelector('#form63 #field0');var field0 = new LiveValidation(dom0, {validMessage: \"\", onlyOnBlur: false, wait: 300});function handleFormSubmit(ele) { var submitButton = ele.querySelector('input[type=submit]'); var spinner = document.createElement('span'); spinner.setAttribute('class', 'loader'); submitButton.setAttribute('disabled', true); submitButton.style.cursor = 'wait'; submitButton.parentNode.appendChild(spinner); return true; }function resetSubmitButton(e){ var submitButtons = e.target.form.getElementsByClassName('submit-button'); for(var i=0;i<submitButtons.length;i++){  submitButtons[i].disabled = false; }  }function addChangeHandler(elements){  for(var i=0; i<elements.length; i++){   elements[i].addEventListener('change', resetSubmitButton); }  }var form = document.getElementById('form63'); addChangeHandler(form.getElementsByTagName('input')); addChangeHandler(form.getElementsByTagName('select')); addChangeHandler(form.getElementsByTagName('textarea'));var nodes = document.querySelectorAll('#form63 input[data-subscription]');  if (nodes) { for (i = 0, len = nodes.length; i < len; i++) {var status = nodes[i].dataset ? nodes[i].dataset.subscription : nodes[i].getAttribute('data-subscription'); if(status ==='true') {nodes[i].checked = true;}}};var nodes = document.querySelectorAll('#form63 select[data-value]');   if (nodes) { for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; var selectedValue = node.dataset ? node.dataset.value : node.getAttribute('data-value'); if (selectedValue) { for (var j = 0; j < node.options.length; j++) { if(node.options[j].value === selectedValue) { node.options[j].selected = 'selected';break;}}}}}</script></div>",
  "isHidden": "false",
  "processingSteps": [
    {
      "type": "FormStepCreateUpdateContactFromFormField",
      "id": "188",
      "name": "Create / Update Contact, Prospect or Company",
      "execute": "always",
      "mappings": [
        
      ]
    }
  ],
  "processingType": "externalWebsite",
  "size": {
    "type": "Size",
    "width": "0",
    "height": "0"
  },
  "style": "{\"fieldSize\":\"medium\",\"labelPosition\":\"top\"}"
}
			
Back to Top