curl --request POST \
--url https://api.getenso.ai/events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"CustomerEntityId": "<string>",
"metric": "<string>",
"value": 123,
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {},
"eventId": "<string>",
"JobId": "<string>",
"jobId": "<string>"
}
]
}
'{
"status": "success",
"message": "Success",
"data": {
"summary": {
"success": 0,
"failed": 3,
"total": 3
},
"failedRecords": [
{
"index": 2,
"error": "Customer entity not found",
"code": 2002,
"statusCode": 404
},
{
"index": 0,
"error": "Cannot parse input: expected '\"' before: 'N NaN:NaN:NaN.NaN\",\"metadata\":null,\"status\":\"active\",\"CustomerEntityId\":\"ent_6CsgzAdRgTlzT_9O\",\"JobId\":\"job_xI_wWRvcLpZzhiJF\",\"OrganisationId\":\"org_k0JGnR6VZsLd': (while reading the value of key timestamp): (at row 1)\\n: While executing WaitForAsyncInsert. ",
"code": "27",
"statusCode": 400
},
{
"index": 1,
"error": "Cannot parse input: expected '\"' before: 'N NaN:NaN:NaN.NaN\",\"metadata\":null,\"status\":\"active\",\"CustomerEntityId\":\"ent_6CsgzAdRgTlzT_9O\",\"JobId\":\"job_xI_wWRvcLpZzhiJF\",\"OrganisationId\":\"org_k0JGnR6VZsLd': (while reading the value of key timestamp): (at row 1)\\n: While executing WaitForAsyncInsert. ",
"code": "27",
"statusCode": 400
}
]
}
}API to create events in batch
curl --request POST \
--url https://api.getenso.ai/events/batch \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"CustomerEntityId": "<string>",
"metric": "<string>",
"value": 123,
"timestamp": "2023-11-07T05:31:56Z",
"metadata": {},
"eventId": "<string>",
"JobId": "<string>",
"jobId": "<string>"
}
]
}
'{
"status": "success",
"message": "Success",
"data": {
"summary": {
"success": 0,
"failed": 3,
"total": 3
},
"failedRecords": [
{
"index": 2,
"error": "Customer entity not found",
"code": 2002,
"statusCode": 404
},
{
"index": 0,
"error": "Cannot parse input: expected '\"' before: 'N NaN:NaN:NaN.NaN\",\"metadata\":null,\"status\":\"active\",\"CustomerEntityId\":\"ent_6CsgzAdRgTlzT_9O\",\"JobId\":\"job_xI_wWRvcLpZzhiJF\",\"OrganisationId\":\"org_k0JGnR6VZsLd': (while reading the value of key timestamp): (at row 1)\\n: While executing WaitForAsyncInsert. ",
"code": "27",
"statusCode": 400
},
{
"index": 1,
"error": "Cannot parse input: expected '\"' before: 'N NaN:NaN:NaN.NaN\",\"metadata\":null,\"status\":\"active\",\"CustomerEntityId\":\"ent_6CsgzAdRgTlzT_9O\",\"JobId\":\"job_xI_wWRvcLpZzhiJF\",\"OrganisationId\":\"org_k0JGnR6VZsLd': (while reading the value of key timestamp): (at row 1)\\n: While executing WaitForAsyncInsert. ",
"code": "27",
"statusCode": 400
}
]
}
}| Code | Description |
|---|---|
| 2001 | Customer entity ID required |
| 2002 | Customer entity not found |
| 2003 | events array is required |
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Batch events payload
List of events to be created
Show child attributes