Batch structure
Every batch has the following fields:
batchId (int) - The Batch ID.
batchStatus (string) - The Batch status.
batchResults (object) - The record and relationship objects that are the result of the batch.
{
"batchId": Int,
"batchStatus": "Created"/"InProgress"/"Errored"/"Cancelled"/"Complete",
"batchResults": {
"records": {EntityObjectDictionary},
"relationships": [RelationshipObject]
}
}Batch records
Batch records are organized in a key-value collection, where the records are grouped by the char type ID. For example, the following JSON contains four records, two contacts (char type ID = 2) and two catalog items (char type ID = 1).
{
"records": {
"2": [
{
"characteristics": {
"department": "Sales",
"first_name": "John",
"last_name": "Smith"
},
"template": {
"templateId": 1
},
"title": "Person 1"
},
{
"characteristics": {
"department": "Accounting",
"first_name": "Susan",
"last_name": "Williams"
},
"template": {
"templateId": 1
},
"title": "Person 2"
}
],
"1": [
{
"characteristics": {
"release_year": 2006
},
"template": {
"templateId": 1
},
"title": "Catalog 1"
},
{
"characteristics": {
"release_year": 2013
},
"template": {
"templateId": 1
},
"title": "Catalog 2"
}
]
}
}When retrieving a batch, the records will be organized in a slightly different structure. The records will still be organized in a key-value collection by char type ID, but each individual entity will have a few new fields:
record (object) - The entity object.
code (int) - The HTTP status code indicating the status of creating/updating/deleting/retrieving the record. Examples are 200, 400, 403, 404, 409
message (int) - A human-readable message of the status of the batch record. Examples would be "Found.", "Created.", "Updated.", "Deleted.", "Action Executed.", "Copied.", "Record Not Found.", "Access Denied.", "Invalid Record.", "Record Locked."
id (int) - The ID of the record.
Batch relationships
When retrieving a batch, the relationships will take on a similar structure as the records in the response, containing the additional fields below:
relationship(object) - The relationship object.
code (int) - The HTTP status code indicating the status of creating/deleting/retrieving the relationship. Examples are 200, 400, 403, 404, 409
message (int) - A human-readable message of the status of the batch record. Examples would be "Found.", "Created.", "Deleted.", "Access Denied."
id (int) - The ID of the relationship.
Last updated
Was this helpful?

