This POST API can be used to provide bulk upload status, including success and error details in response, based on the batch ID provided.
URL Format: https://<Instance>/leo-centraldata-orgstructurebulkservice/api/v1/BulkUpload/getbulkuploadstatus
Query Params: batchId:”2cb95c69-7bc2-452b-896b-f28f480f1656”
{
"status": "PartialSuccess",
"batchId": "2cb95c69-7bc2-452b-896b-f28f480f1656",
"successDetails": [
{
"key": "DocTest2",
"entityCode": "DocTest2",
"entityName": "DocTest2",
"entityType": "Facility",
"lobCode": "003",
"uniqueId": "7d69123c-6033-4d02-9ad2-888b1ed78f8c"
}
],
"errorDetails": [
{
"key": "DocTest3",
"uniqueId": "39f172f5-40f0-422b-b9a3-c8359e6596f3",
"errorDetails": [
{
"entityDetailCode": 0,
"entityName": "DocTest3",
"entityType": "Facility",
"entityCode": "DocTest3",
"lobCode": "003",
"parentEntityCode": "",
"isFailed": true,
"errors": "IsActive flag is mandatory for all ParentEntityCodeDelta items. (EntityCode = 'DocTest3')",
"errorCodes": "DataException",
"parentEntityDetailCode": null
}
],
"description": "IsActive flag is mandatory for all ParentEntityCodeDelta items. (EntityCode = 'DocTest3')",
"status": "ValidationError"
}
]
}
Request Payload | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
batchId | Yes | String | Batch Id of the bulk upload | · Valid Batch Id should be provided |
Response | ||||
Property | Required? | Data type | Description | Validations / Exceptions |
status |
| String | Status of the provided batch Id. Details shared below Status table. |
|
batchId |
| String | Provided batch Id |
|
successDetails |
| List of success detail object | An array of success details. Details shared below Success details table. |
|
errorDetails |
| List of error detail object | An array of error details. |
|
Status | |
Status | Description |
InProgress | At least one is not initiated |
NotStarted | When all records have status as Initiated |
PartialSuccess | All records status processed with some validation error |
Failure | Processing of all records has failed |
Success | Processing of all records successful |
Success Details | |||
Property | Required? | Data type | Description |
key |
| String | Entity Code of an Entity. |
entityCode |
| String | Entity Code of an Entity. |
entityName |
| String | Entity Name of an Entity. |
entityType |
| string | Entity Type of an Entity. |
lobCode
|
| string | The Lob Code of an Entity. |
uniqueId |
| String | Unique Id of an Entity. |
Error Details | |||
Property | Required? | Data type | Description |
key |
| String | Entity Code of an Entity. |
uniqueId |
| String | Unique Id of an Entity. |
errorDetails |
| List of error detail object | An array of error detail comes in response specific to an entity. Detailed description in below errorDetails table. |
description |
| string | Error description in detail. |
status |
| string |
|
errorDetails | |||
Property | Required? | Data type | Description |
entityDetailCode |
| String | Entity Detail Code of an Entity. |
entityName |
| String | Entity Name of an Entity. |
entityType |
| String | Entity Type of an Entity. |
entityCode |
| String | Entity Code of an Entity. |
lobCode |
| String | Lob Code of an Entity. |
parentEntityCode |
| String | Parent Entity Detail Code of an Entity. |
isFailed |
| Boolean | It will be true if there is an error |
Errors |
| String | There are various types of errors depending on the received payload. Refer Errors table below |
errorCodes |
| String | There are various types of error codes depending on the received payload. Refer Error Codes below |
parentEntityDetailCode |
| String | Parent Entity Detail Code of an Entity |
Error Codes | |
Error Code | Summary |
ManadatoryException | If mandatory fields not specified |
DataException | If there are any validation errors on data entities |
LengthException | If Min and max field length boundaries exceeded |
SystemException | Generic system exception |
Errors:
Error Messages |
Max Length for entity name is 100 |
Max Length for entity code is 50 |
Max Length for entity type is 50 |
Max Length for parent entity code is 50 |
Max Length for parent entity type is 50 |
Entity name cannot be null or empty |
Entity code cannot be null or empty |
Invalid entity type |
Entity type cannot be null or empty |
Lob code cannot be null or empty |
Invalid lob code / Provided LOB Not Published |
Entity structure not exists with association type as Org/Acc |
Parent entity type is invalid. |
No parent entity codes specified for org entity |
IsActive flag is mandatory for all ParentEntityCodeDelta items. |
EntityCode is mandatory for all ParentEntityCodeDelta items. |
Deletion of single parent not allowed for entity |