Create form data in batch for a single form
/api/rest/2.0/data/form/{id}/batch
Request
- application/json
-
id(required): integer
The ID of the form
-
depth: string
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:
minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth.
object
AsyncFormSubmissionBatch
-
batchCorrelationId:
string
The unique identifier of the batch. Optional String field. If present, must be unique across created batches. If
batchCorrelationId
is not unique, then the entire batch will fail. ThebatchCorrelationId
is persisted and could be used to retrieve form batch details. -
callbackUrl:
string
The URL to be called back once processing of form submisssion batch is completed
-
currentBatchStatus:
string
The current status of the batch. Possible values: Queued, InProgress, Warning, Error, Success. This is a read-only property.
-
currentStatus:
string
Current status of form submission batch when submitted through asynchronous submission
-
depth:
string
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:
minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
elements:
array elements
A list of form data elements
-
id:
string
Read Only:
true
The ID of the asynchronous form submission batch. This is a read-only property -
processingStatus:
string
The processing status of the batch. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property
array
-
Array of:
object FormData
Title:
FormData
object
FormData
-
correlationId:
string
The unique identifier of form submission within the batch. Optional String field. If present, must be unique across created batches. If
correlationId
is not unique, then the entire batch will fail. ThecorrelationId
is persisted and could be used to identify the form submit. -
currentStatus:
string
The current status of the form submission job. Possible values: Queued, InProgress, Error, and Success.
-
fieldValues:
array fieldValues
A list of key/value pairs identifying the form data (field name / value)
-
id:
string
Read Only:
true
The ID of the form submit if synchronous or ID of the form submission job if asynchronous. This is a read-only property -
processedAt:
string
Unix timestamp for the date and time the form data was processed if submitted through asynchronous submission. This is a read-only property
-
processingStepErrors:
array processingStepErrors
A list of Processing Step Errors occurred in current form submission. This is a read-only property
-
rowId:
integer
In case of an asynchronous form submission if processed then submit ID of form submission. This is a read-only property
-
submittedAt:
string
Unix timestamp for the date and time the form data was submitted. This is a read-only property
-
submittedByContactId:
string
The ID of the contact that submitted the form. This is a read-only property
-
type:
string
The asset's type in Eloqua. This is a read-only property
-
validationErrors:
array validationErrors
Validation errors if any occured in form submission. This is a read-only property
array
-
Array of:
object FieldValue
Title:
FieldValue
array
-
Array of:
object ProcessingStepError
Title:
ProcessingStepError
array
-
Array of:
object ObjectValidationError
Title:
ObjectValidationError
object
FieldValue
-
id:
string
Read Only:
true
The id of the field to be set to the corresponding value. -
name:
string
Name of the field value.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
value:
string
The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
object
ProcessingStepError
-
errorCode:
integer
Unique Error Code for current error
-
errorDescription:
string
Detailed information about current error
-
errorMessage:
string
Error message for current error code
-
processingStepDisplayName:
string
DisplayName of the processing step including description (if configured)
-
processingStepId:
string
Processing step id during which error ocurred
-
processingStepTypeId:
string
Type of the processing step during which error ocurred
-
type:
string
The asset's type in Eloqua.
object
ObjectValidationError
-
container:
object ObjectKey
Title:
ObjectKey
-
property:
string
-
requirement:
object Requirement
Title:
Requirement
-
type:
string
-
value:
string
object
ObjectKey
-
container:
object ObjectKey
Title:
ObjectKey
-
objectId:
string
-
objectType:
string
-
type:
string
Response
- application/json
201 Response
object
AsyncFormSubmissionBatch
-
batchCorrelationId:
string
The unique identifier of the batch. Optional String field. If present, must be unique across created batches. If
batchCorrelationId
is not unique, then the entire batch will fail. ThebatchCorrelationId
is persisted and could be used to retrieve form batch details. -
callbackUrl:
string
The URL to be called back once processing of form submisssion batch is completed
-
currentBatchStatus:
string
The current status of the batch. Possible values: Queued, InProgress, Warning, Error, Success. This is a read-only property.
-
currentStatus:
string
Current status of form submission batch when submitted through asynchronous submission
-
depth:
string
Level of detail returned by the request. Eloqua APIs can retrieve entities at three different levels of depth:
minimal
,partial
, andcomplete
. Any other values passed are reset tocomplete
by default. For more information, see Request depth. -
elements:
array elements
A list of form data elements
-
id:
string
Read Only:
true
The ID of the asynchronous form submission batch. This is a read-only property -
processingStatus:
string
The processing status of the batch. This is a read-only property.
-
type:
string
The asset's type in Eloqua. This is a read-only property
array
-
Array of:
object FormData
Title:
FormData
object
FormData
-
correlationId:
string
The unique identifier of form submission within the batch. Optional String field. If present, must be unique across created batches. If
correlationId
is not unique, then the entire batch will fail. ThecorrelationId
is persisted and could be used to identify the form submit. -
currentStatus:
string
The current status of the form submission job. Possible values: Queued, InProgress, Error, and Success.
-
fieldValues:
array fieldValues
A list of key/value pairs identifying the form data (field name / value)
-
id:
string
Read Only:
true
The ID of the form submit if synchronous or ID of the form submission job if asynchronous. This is a read-only property -
processedAt:
string
Unix timestamp for the date and time the form data was processed if submitted through asynchronous submission. This is a read-only property
-
processingStepErrors:
array processingStepErrors
A list of Processing Step Errors occurred in current form submission. This is a read-only property
-
rowId:
integer
In case of an asynchronous form submission if processed then submit ID of form submission. This is a read-only property
-
submittedAt:
string
Unix timestamp for the date and time the form data was submitted. This is a read-only property
-
submittedByContactId:
string
The ID of the contact that submitted the form. This is a read-only property
-
type:
string
The asset's type in Eloqua. This is a read-only property
-
validationErrors:
array validationErrors
Validation errors if any occured in form submission. This is a read-only property
array
-
Array of:
object FieldValue
Title:
FieldValue
array
-
Array of:
object ProcessingStepError
Title:
ProcessingStepError
array
-
Array of:
object ObjectValidationError
Title:
ObjectValidationError
object
FieldValue
-
id:
string
Read Only:
true
The id of the field to be set to the corresponding value. -
name:
string
Name of the field value.
-
type:
string
The asset's type in Eloqua. This is a read-only property.
-
value:
string
The value to set the corresponding field id to. Date values must be submitted as a unix timestamp.
object
ProcessingStepError
-
errorCode:
integer
Unique Error Code for current error
-
errorDescription:
string
Detailed information about current error
-
errorMessage:
string
Error message for current error code
-
processingStepDisplayName:
string
DisplayName of the processing step including description (if configured)
-
processingStepId:
string
Processing step id during which error ocurred
-
processingStepTypeId:
string
Type of the processing step during which error ocurred
-
type:
string
The asset's type in Eloqua.
object
ObjectValidationError
-
container:
object ObjectKey
Title:
ObjectKey
-
property:
string
-
requirement:
object Requirement
Title:
Requirement
-
type:
string
-
value:
string
object
ObjectKey
-
container:
object ObjectKey
Title:
ObjectKey
-
objectId:
string
-
objectType:
string
-
type:
string
400 Response
401 Response
403 Response
404 Response
500 Response
Examples
The following examples demonstrate how to create new form data in a batch using an HTTP request and cURL. For more information on requests, see API requests.
HTTP request examples
Using a batchCorrelationId
to identify the batch, create new form data in a batch for the form asset with ID #3 at complete depth:
POST /api/REST/2.0/data/form/3/batch?depth=complete
Content-Type: application/json
Request body:
{
"callbackUrl": "https://www.oracle.com",
"batchCorrelationId": "BBB61C0B-8B95-4050-8D0F-11A0587E50EF",
"formData": [
{
"correlationId": "BBB61C0B-8B95-4050-8D0F-12A0587E50EF",
"fieldValues": [
{
"type": "FieldValue",
"id": "1",
"name": "firstName",
"value": "John"
},
{
"type": "FieldValue",
"id": "2",
"name": "lastName",
"value": "Snow"
},
{
"type": "FieldValue",
"id": "13",
"name": "Salesperson",
"value": "Sales@oracle.com"
}
]
}
]
}
Response in case of success and no validation errors:
{
"type": "AsyncFormSubmissionBatch",
"id": "2",
"callbackUrl": "https://www.oracle.com",
"created": [
{
"type": "FormData",
"currentStatus": "Success",
"id": "15",
"fieldValues": [
{
"type": "FieldValue",
"id": "1",
"name": "firstName",
"value": "John"
},
{
"type": "FieldValue",
"id": "2",
"name": "lastName",
"value": "Snow"
},
{
"type": "FieldValue",
"id": "13",
"name": "Salesperson",
"value": "Sales@oracle.com"
}
],
"submittedAt": "1604932720",
"correlationId": "bbb61c0b-8b95-4050-8d0f-12a0587e50ef"
}
],
"depth": "complete"
}
Without a batchCorrelationId
to identify the batch, create new form data in a batch for the form asset with ID #3 at minimal depth:
POST /api/REST/2.0/data/form/3/batch?depth=minimal
Content-Type: application/json
Request body:
{
"callbackUrl": "https://www.oracle.com",
"formData": [
{
"correlationId": "BBB61C0B-8B95-4050-8D0F-12A0587E50EF",
"fieldValues": [
{
"type": "FieldValue",
"id": "1",
"name": "firstName",
"value": "John"
},
{
"type": "FieldValue",
"id": "2",
"name": "lastName",
"value": "Snow"
},
{
"type": "FieldValue",
"id": "13",
"name": "Salesperson",
"value": "Sales@oracle.com"
}
]
}
]
}
Response in case of success and no validation errors:
{
"type": "AsyncFormSubmissionBatch",
"id": "4",
"callbackUrl": "https://www.oracle.com",
"created": [
{
"type": "FormData",
"id": "17",
"correlationId": "bbb61c0b-8b95-4050-8d0f-12a0587e50ef"
}
],
"depth": "minimal"
}
Create new form data in a batch for the form asset with ID #3, without a batchCorrelationId
or correlationId
:
POST /api/REST/2.0/data/form/3/batch
Content-Type: application/json
Request body:
In the request we are specifying invalid form data for the FieldValue with ID 13.
{
"callbackUrl": "https://www.oracle.com",
"formData": [
{
"fieldValues": [
{
"type": "FieldValue",
"id": "1",
"name": "firstName",
"value": "John"
},
{
"type": "FieldValue",
"id": "2",
"name": "lastName",
"value": "Snow"
},
{
"type": "FieldValue",
"id": "13",
"name": "address",
"value": "Thisfieldistoolongandshouldfailbecauseofavalidationerror"
}
]
}
]
}
Response in case of success, with validation errors:
{
"type": "AsyncFormSubmissionBatch",
"callbackUrl": "https://www.oracle.com",
"depth": "complete",
"errors": [
{
"type": "FormData",
"currentStatus": "Error",
"fieldValues": [
{
"type": "FieldValue",
"id": "1",
"name": "firstName",
"value": "John"
},
{
"type": "FieldValue",
"id": "2",
"name": "lastName",
"value": "Snow"
},
{
"type": "FieldValue",
"id": "13",
"name": "address",
"value": "Thisfieldistoolongandshouldfailbecauseofavalidationerror"
}
],
"validationErrors": [
{
"type": "ObjectValidationError",
"container": {
"type": "ObjectKey",
"objectType": "FormData"
},
"property": "13",
"requirement": {
"type": "ValidTextLengthRequirement"
},
"value": "Thisfieldistoolongandshouldfailbecauseofavalidationerror"
}
]
}
]
}
cURL example
Here is the first 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 POST --data '{"callbackUrl":"https://www.example.com","batchCorrelationId":"BBB61C0B-8B95-4050-8D0F-11A0587E50EF","formData":[{"correlationId":"BBB61C0B-8B95-4050-8D0F-12A0587E50EF","fieldValues":[{"type":"FieldValue","id":"1","name":"firstName","value":"John"},{"type":"FieldValue","id":"2","name":"lastName","value":"Snow"},{"type":"FieldValue","id":"13","name":"Salesperson","value":"Sales@oracle.com"}]}]}' https://secure.p03.eloqua.com/api/rest/2.0/data/form/3/batch