REST API: REST Returns Code 201 (Created) Instead Of Error Code for Form Submission with Invalid Data

(Doc ID 2084933.1)

Last updated on AUGUST 30, 2016

Applies to:

Oracle Eloqua Marketing Cloud Service - Version 10 and later
Information in this document applies to any platform.

Symptoms

When a form is submitted containing invalid data, REST 2.0 API returns a 201 (create) code instead of an error code.

Sample Request

POST https://secure.eloqua.com/api/rest/2.0/data/form/<form id>

{
"type": "FormData",
"fieldValues": [{
"id": "1319",
"value": "abc.com",
"type": "FieldValue"
},
{
"id": "1320",
"value": "lalalal",
"type": "FieldValue"
},
{
"id": "1321",
"value": "hello",
"type": "FieldValue"
}
]
}

  

Note:
  • Field 1319 is Email Address (submitted value abc.com)
  • Field 1320 is First Name (submitted value lalalal)
  • Field 1321 is Birthday (submitted value hello)

Sample Response

HTTP/1.1 201 Created
Cache-Control: private
Content-Length: 203
Content-Type: application/json
X-Request-Id: d28ed01b4548b3ad572dcc5ed0d9/250727
P3P: CP="IDC DSP COR DEVa TAIa OUR BUS PHY UNI COM NAV CNT STA",
Date: Thu, 18 Aug 2016 06:05:24 GMT

{"type":"FormData","id":"478288","fieldValues":[{"type":"FieldValue","id":"1319","value":"abc.com"},{"type":"FieldValue","id":"1320","value":"lalalal"},{"type":"FieldValue","id":"1321","value":"hello"}]

  

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms