SaveOrgEntity (POST)

Overview

This POST API allows for the creation or updation of ORG entities in Quantum. The data will be processed synchronously.

URL Format: https://<Instance>/leo-centraldata-orgstructurebulkservice/api/v1/InterfaceApi/OrgEntities

Request
  {
    "batchId": "string",
    "entityName": "string",
    "entityCode": "string",
    "entityDescription": "string",
    "entityType": "string",
    "lobCode": "string",
    "parentEntity": "string",
    "isActive": true,
    "parentEntityCodes": [
      "string"
    ],
    "addressLine1": "string",
    "addressLine2": "string",
    "addressLine3": "string",
    "city": "string",
    "state": "string",
    "country": "string",
    "zipCode": "string",
    "fax": "string",
    "phone1": "string",
    "phone2": "string",
    "county": "string",
    "poBoxNumber": "string",
    "email": "string",
    "url": "string",
    "parentEntityCodeDelta": [
      {
        "entityCode": "string",
        "isActive": true
      }
    ]
  }
Response
 {
  "returnValue": {
    "errorDetails": [
      {
        "entityDetailCode": long,
        "entityName": "string",
        "entityType": "string",
        "entityCode": "string",
        "lobCode": "string",
        "parentEntityCode": "string",
        "isFailed": true,
        "errors": "string",
        "errorCodes": "string",
        "parentEntityDetailCode": long
      }
    ],
    "successDetails": [
      {
        "entityDetailCode": long,
        "entityName": "string",
        "entityType": "string",
        "entityCode": "string",
        "lobCode": "string",
        "parentEntityCode": "string",
        "isFailed": false,
        "errors": "",
        "errorCodes": "",
        "parentEntityDetailCode": long
      }
    ]
  },
  "isSuccess": true,
  "errors": null,
  "exception": null,
  "errorMessage": null,
  "errorCode": null,
  "correlationId": null
}
Data Elements

Request Payload

Property

Required?

Data type

Description

Validations / Exceptions

entityName

Yes

String

Name of the Entity

· Max Length for entity name is 100

· Entity name cannot be null or empty

entityCode

Yes

String

Code of the Entity

· Max Length for entity code is 50

· Entity code cannot be null or empty

entityDescription

Optional

String

Entity Description

 

entityType

Yes

String

Entity Type. Validates with Org Structure

· Max Length for entity type is 50

· Invalid Entity Type

· Entity type cannot be null or empty

lobCode

Yes

String

Line Of Business Code. Validates with Org Structure

· Invalid Lob Code

· Lob code cannot be null or empty

parentEntity

Yes

String

Parent Entity Type. Validates with Org Structure

· Max Length for parent entity type is 50

· Parent entity type cannot be null or empty

· Invalid Parent Entity Type

isActive

Yes

Boolean

Status of the Entity if Active or inactive (true/false)

 

parentEntityCodes

Optional

List of String

Parent Entity Code. This will override existing parents for an entity. Validates if provide value exists in system.

· Max Length for parent entity code is 50

· No parent entity codes specified for org entity

addressLine1

Optional

String

Address Information

 

addressLine2

Optional

String

Address Information

 

addressLine3

Optional

String

Address Information

 

city

Optional

String

City Information

 

state

Optional

String

State Information

 

country

Optional

String

Country Information

 

zipCode

Optional

String

Zip Code

 

fax

Optional

String

Fax

 

phone1

Optional

String

Phone Number 1

 

phone2

Optional

String

Phone Number 2

 

poBoxNumber

Optional

String

PO Box Number

 

email

Optional

String

Email Address

 

url

Optional

String

URL

 

parentEntityCodeDelta

Optional

List of parentEntityCodeDelta Object

Parent Entity Code delta will add/ remove parent for an entity based on isActive true/false. Provided entityCode will be validated in the system.

· EntityCode is mandatory for all ParentEntityCodeDelta items.

· IsActive flag is mandatory for all ParentEntityCodeDelta items.

 
 

ParentEntityCodeDelta

Property

Required?

Data type

Description

Validations / Exceptions

entityCode

Optional

String

Entity Code of a Parent

· Max length is 50

· No parent entity codes specified for org entity

· EntityCode is mandatory for all ParentEntityCodeDelta items.

isActive

Optional

Boolean

Status of the Entity if Active or inactive (true/false)

· IsActive flag is mandatory for all ParentEntityCodeDelta items.

 
 

Interface Status Response

Property

Required?

Data type

Description

Validations / Exceptions

returnValue

 

Object

It’s an object that contains actual response data from API

 

isSuccess

 

boolean

It’s a Boolean flag that defines API is successfully executed or not

 

 
 

Return Value

Property

Required?

Data type

Description

Validations / Exceptions

errorDetails

 

List of error detail object

An array of errorDetail comes in response specific to an entity given in payload.

 

successDetails

 

List of success detail object

An array of successDetail comes in response specific to an entity given in payload.

 

 
 

Success/Error Details

Property

Required?

Data type

Description

Validations / Exceptions

entityDetailCode

 

Long

EntityDetailCode of an Entity. It’s a primary key

 

entityName

 

String

The Name of an entity sent in the payload will appear in the response under errorDetail or successDetail

· Max Length for entity name is 100

· Entity name cannot be null or empty

entityType

 

String

The Entity Type of an entity sent in the payload will appear in the response under errorDetail or successDetail. It will be validated against Org Structure.

· Max Length for entity type is 50

· Invalid Entity Type

· Entity type cannot be null or empty

entityCode

 

string

The Entity Code of an entity sent in the payload will appear in the response under errorDetail or successDetail

· Max Length for entity code is 50

· Entity code cannot be null or empty

lobCode

 

string

The Lob Code of an entity sent in the payload will appear in the response under errorDetail or successDetail. It will be validated against Org Structure.

· Invalid Lob Code

· Lob code cannot be null or empty

parentEntityCode

 

String

The Parent Entity Code of an entity sent in the payload will appear in the response under errorDetail or successDetail. It will be validated against Org Structure.

· Max Length for parent entity code is 50

· No parent entity codes specified for org entity

isFailed

 

Boolean

It will be true if there is an error and false if it is successful.

· True

· False

errors

 

String

There are various types of errors depending on the received payload.

Refer Error details below

errorCodes

 

String

There are various types of error codes depending on the received payload.

Refer Error Codes below

parentEntityDetailCode

 

Long

The Parent Entity Detail Code of an entity sent in the payload will appear in the response under errorDetail or successDetail.

 

 
 

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