Partially update a form

patch

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

Partially updates the form specified by the id parameter. Only properties included in the request body will be modified. Forms in archive cannot be updated.

Request

Supported Media Types
Path Parameters
Body ()
The request body defines the details of the form for which properties are to be updated.
Root Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : FormFieldUpdateMapping
Type: object
Title: FormFieldUpdateMapping
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form granted to your current instance. This is a read-only property.
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, and FormStepWebTracking.
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source
Nested Schema : permissions
Type: array
The permissions for the form field update mapping granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : permissions
Type: array
The permissions for the form element granted to your current instance.
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : ProcessingStepCondition
Type: object
Title: ProcessingStepCondition
Show Source
Nested Schema : permissions
Type: array
The permissions for the form processing step granted to your current instance.
Show Source
Nested Schema : conditionalFieldCriteria
Type: array
The conditional field criteria for the form processing step condition.
Show Source
Nested Schema : FieldComparisonCriteria
Type: object
Title: FieldComparisonCriteria
Show Source
Nested Schema : Condition
Type: object
Title: Condition
Show Source
Nested Schema : permissions
Type: array
The permissions for the field comparison criteria granted to your current instance. This is a read-only property.
Show Source
Back to Top

Response

Supported Media Types

200 Response

OK.
Body ()
Root Schema : Form
Type: object
Title: Form
Show Source
Nested Schema : FormFieldUpdateMapping
Type: object
Title: FormFieldUpdateMapping
Show Source
Nested Schema : elements
Type: array
Array consisting of form elements.
Show Source
Nested Schema : permissions
Type: array
The permissions for the form granted to your current instance. This is a read-only property.
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, and FormStepWebTracking.
Show Source
Nested Schema : Size
Type: object
Title: Size
Show Source
Nested Schema : permissions
Type: array
The permissions for the form field update mapping granted to your current instance. This is a read-only property.
Show Source
Nested Schema : FormElement
Type: object
Title: FormElement
Show Source
Nested Schema : permissions
Type: array
The permissions for the form element granted to your current instance.
Show Source
Nested Schema : FormProcessingStep
Type: object
Title: FormProcessingStep
Show Source
Nested Schema : ProcessingStepCondition
Type: object
Title: ProcessingStepCondition
Show Source
Nested Schema : permissions
Type: array
The permissions for the form processing step granted to your current instance.
Show Source
Nested Schema : conditionalFieldCriteria
Type: array
The conditional field criteria for the form processing step condition.
Show Source
Nested Schema : FieldComparisonCriteria
Type: object
Title: FieldComparisonCriteria
Show Source
Nested Schema : Condition
Type: object
Title: Condition
Show Source
Nested Schema : permissions
Type: array
The permissions for the field comparison criteria granted to your current instance. This is a read-only property.
Show Source

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

The following examples demonstrate how to update the a form using an HTTP request and cURL. For more information on requests, see API requests.

HTTP Request Example

Update the HTML of a form with id#3:


PATCH /api/REST/2.0/assets/form/3
Content-Type: application/json 
			

Request body:


{
  "id": "3",
  "name": "Starboat Registration Form",
  "html": "<div><body><p>New html content</p></body></div>"
}
			

Response:


{
  "type": "Form",
  "currentStatus": "Draft",
  "id": "3",
  "createdAt": "1421850657",
  "createdBy": "5",
  "depth": "complete",
  "folderId": "7",
  "name": "test",
  "permissions": [
    "Retrieve",
    "SetSecurity",
    "Delete",
    "Update"
  ],
  "updatedAt": "1515782275",
  "updatedBy": "51",
  "archived": "false",
  "defaultKeyFieldMapping": {
    "type": "FormFieldUpdateMapping",
    "sourceFormFieldId": "3",
    "targetEntityFieldId": "100001"
  },
  "elements": [
    {
      "type": "FormFieldGroup",
      "id": "1",
      "depth": "complete",
      "name": "Contact Info",
      "instructions": "",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "fields": [
        {
          "type": "FormField",
          "id": "1",
          "name": "First Name",
          "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
          "createdFromContactFieldId": "100002",
          "dataType": "text",
          "displayType": "text",
          "fieldMergeId": "2",
          "htmlName": "firstName",
          "useGlobalSubscriptionStatus": "False",
          "validations": [
            
          ]
        },
        {
          "type": "FormField",
          "id": "2",
          "name": "Last Name",
          "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
          "createdFromContactFieldId": "100003",
          "dataType": "text",
          "displayType": "text",
          "htmlName": "lastName",
          "useGlobalSubscriptionStatus": "False",
          "validations": [
            
          ]
        },
        {
          "type": "FormField",
          "id": "3",
          "name": "Email Address",
          "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
          "createdFromContactFieldId": "100001",
          "dataType": "text",
          "displayType": "text",
          "htmlName": "emailAddress",
          "useGlobalSubscriptionStatus": "False",
          "validations": [
            
          ]
        }
      ]
    },
    {
      "type": "FormField",
      "id": "9",
      "name": "Annual Revenue",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100047",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "annualRevenue1",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "10",
      "name": "Country",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100012",
      "dataType": "text",
      "displayType": "singleSelect",
      "fieldMergeId": "4",
      "htmlName": "country",
      "optionListId": "4",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "11",
      "name": "Lead Status",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100048",
      "dataType": "text",
      "displayType": "text",
      "htmlName": "leadStatus1",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "12",
      "name": "Lead Score - Profile (Explicit)",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100178",
      "dataType": "numeric",
      "displayType": "text",
      "fieldMergeId": "1",
      "htmlName": "leadScoreExplicit1",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "13",
      "name": "Salesperson",
      "style": "{\"fieldSize\":\"large\",\"labelPosition\":\"top\"}",
      "createdFromContactFieldId": "100022",
      "dataType": "text",
      "displayType": "text",
      "fieldMergeId": "5",
      "htmlName": "salesperson",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    },
    {
      "type": "FormField",
      "id": "4",
      "name": "Submit",
      "style": "{\"submitButtonStyleType\":\"standard\",\"submitButtonWidthStyle\":\"100px\",\"submitButtonHeightStyle\":\"24px\"}",
      "dataType": "text",
      "displayType": "submit",
      "htmlName": "submit",
      "useGlobalSubscriptionStatus": "False",
      "validations": [
        
      ]
    }
  ],
  "html": "<div><body><p>New html content</p></body></div>",
  "htmlName": "form",
  "isHidden": "false",
  "processingSteps": [
    {
      "type": "FormStepSendEmail",
      "id": "211",
      "name": "Send Email",
      "execute": "always",
      "allowResend": "yes",
      "emailAddressFormFieldId": "3",
      "emailId": {
        "type": "ProcessingStepValueWithLookup",
        "valueType": "constant"
      },
      "resendLimit": "28"
    },
    {
      "type": "FormStepSendNotificationEmail",
      "id": "4",
      "name": "Email Notification",
      "execute": "always",
      "encodingId": {
        "type": "ProcessingStepValue",
        "constantValue": "3",
        "valueType": "constant"
      },
      "notificationConfigurationId": "2",
      "recipientEmailAddress": {
        "type": "ProcessingStepValueWithLookup",
        "constantValue": "christine.cacciacarro@oracle.com",
        "valueType": "constant"
      },
      "subject": {
        "type": "ProcessingStepValueWithLookup",
        "valueType": "constant"
      }
    }
  ],
  "processingType": "externalWebsite",
  "size": {
    "type": "Size",
    "width": "0",
    "height": "0"
  },
  "style": "{\"fieldSize\":\"medium\",\"labelPosition\":\"top\"}",
  "submitFailedLandingPageId": "8"
}
			

cURL Example

Here is the same example in cURL given an instance with the name APITest, username API.User, and POD of 3.


curl --user "APITest\API.User" --header "Content-Type: application/json" --request PATCH --data '{"id":"3","name":"Starboat Registration Form","html":"<div><body><p>New html content</p></body></div>"}' https://secure.p03.eloqua.com/api/rest/2.0/data/form/3
			
Back to Top