Bulk API data types
When using the bulk API to retrieve contact and custom object fields, the bulk API returns the following data types:
emailAddress
string
date
number
However the bulk API does not provide insight into the granularity of the data type. For example, the string
and number
data types could refer to more granular specifications that can be useful for building integrations
Example: A string
data type could be a small text or large text field. The difference between these two data types is significant when it comes to character limits, e.g. small text is 100 for contact fields and 250 for custom object fields; whereas, large text is 32,000 for both contact and custom object fields.
For custom objects, a number
data type could be a numeric or number field. The difference between these two data types is significant as it is the difference of an integer versus a float.
Determining data type granularity
Using the application API endpoints, developers can retrieve contact and custom object fields to see more details about the data type. You can use the following endpoints to retrieve fields using the application API.
Application API fields endpoints
Eloqua entity | Endpoint |
---|---|
Contacts | Retrieve a contact field |
Contacts | Retrieve a list of contact fields (depth set to complete) |
Custom objects | Retrieve a custom object |
Custom objects | Retrieve a list of custom objects (depth set to complete) |
Example
Retrieve contact fields using the bulk API.
Request
GET api/bulk/2.0/contacts/fields?limit=2Response
{ "items": [ { "name": "Department", "internalName": "C_Department1", "dataType": "string", "defaultValue": "Hardware", "hasReadOnlyConstraint": false, "hasNotNullConstraint": false, "hasUniquenessConstraint": false, "statement": "{{Contact.Field(C_Department1)}}", "uri": "/contacts/fields/100211", "createdBy": "API.User", "createdAt": "2018-08-17T12:09:00.0000000Z", "updatedBy": "API.User", "updatedAt": "2018-08-17T12:33:20.0270000Z" }, { "name": "Large Text Field", "internalName": "C_Large_Text_Field1", "dataType": "string", "hasReadOnlyConstraint": false, "hasNotNullConstraint": false, "hasUniquenessConstraint": false, "statement": "{{Contact.Field(C_Large_Text_Field1)}}", "uri": "/contacts/fields/100212", "createdBy": "API.User", "createdAt": "2018-09-26T19:16:00.0000000Z", "updatedBy": "API.User", "updatedAt": "2018-09-26T19:16:00.0000000Z" } ], "totalResults": 82, "limit": 2, "offset": 0, "count": 2, "hasMore": true }
Notice the dataType
for both of these contact fields are string
.
Using the application API to retrieve these contact fields, we can get more information about the data types.
Now let's retrieve contact fields using the application API with depth
set to complete.
Request
GET api/rest/1.0/assets/contact/fields?depth=complete&count=2Response
{ "elements": [ { "type": "ContactField", "id": "100211", "createdAt": "1534507740", "createdBy": "35", "depth": "complete", "name": "Department", "updatedAt": "1534509200", "updatedBy": "35", "dataType": "text", "defaultValue": "Hardware", "displayType": "singleSelect", "internalName": "C_Department1", "isReadOnly": "false", "isRequired": "false", "isStandard": "false", "optionListId": "66", "isPopulatedInOutlookPlugin": "false", "updateType": "always" }, { "type": "ContactField", "id": "100212", "createdAt": "1537989360", "createdBy": "9", "depth": "complete", "name": "Large Text Field", "updatedAt": "1537989360", "updatedBy": "9", "dataType": "largeText", "displayType": "text", "internalName": "C_Large_Text_Field1", "isReadOnly": "false", "isRequired": "false", "isStandard": "false", "isPopulatedInOutlookPlugin": "true", "updateType": "always" } ], "page": 1, "pageSize": 2, "total": 82 }
Notice the dataType
for the first contact field is text
, but the second is largeText
. The data type is important when considering character limits. See the Eloqua help center for information about data types and custom object field types.