DeleteParentEntities (DELETE)

Overview

This DELETE API can be used to capture deletions in organization details from ERP into GEP SMART, that can be used as a reference in P2P transactions.

 

URL Format:  https://<Instance>/SmartInterfaceAPI/api/Organization/Entities
 

Request
[
   {
      "entityType": "string",
      "name": "string",
      "code": "string",
      "lobEntityCode": "string",
      "lobEntityType": "string",
      "parentEntityType": "string",
      "parentEntityCode": "string",
      "isActive": true,
      "parentEntityCodes": [
         "string"
      ],
      "isUpdateParentEntities": true,
      "isMapToAllChildEntity": true,
      "isMapToAllParentEntity": true,
      "address": {
         "addressLine1": "string",
         "addressLine2": "string",
         "addressLine3": "string",
         "city": "string",
         "stateCode": "string",
         "stateOther": "string",
         "countryCode": "string",
         "zipCode": "string",
         "faxNo": "string",
         "phoneNo": "string",
         "phoneOther": "string",
         "phoneExtension": "string",
         "phoneOtherExtension": "string",
         "county": "string",
         "poBoxNumber": "string"
      },
      "parentEntityCodeDelta": [
         {
            "entityCode": "string",
            "isActive": true
         }
      ]
   }
]

 

Response
{
   "data": null,
   "statusCode": "String",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "string"
      }
   ]
}

 

Examples

Success Scenario - Request
Below request only contains mandatory attributes:

[
   {
      "entityType": "Cost Center",
      "name": "Cost Centre 10_IA",
      "code": "CC10_Inactive",
      "lobEntityCode": "10P",
      "lobEntityType": "Organization",
      "parentEntityType": "Company Code",
      "parentEntityCode": "101_Inactive",
      "IsUpdateParentEntities": false,
      "isActive": true,
      "parentEntityCodes": [
         "101_Inactive"
      ],
      "isUpdateParentEntities": false,
      "isMapToAllChildEntity": true,
      "isMapToAllParentEntity": true,
      "address": {
         "AddressLine1": "REMARKABLES PARK",
         "City": "QUEENSTOWN",
         "CountryCode": "NZ",
         "FaxNo": "34423067",
         "PhoneNo": "34423045",
         "StateOther": "ZZ",
         "ZipCode": "00000"
      }
   }
]

 

Success Scenario – Response

{
   "data": null,
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "CC10_Inactive"
      }
   ]
}

 

Error Scenario – Request

Below request contains an invalid value of the mandatory attribute - EntityType:
 

[
   {
      "entityType": "BusinessUnit",
      "name": "Cost Centre 10_IA",
      "code": "CC10_Inactive",
      "lobEntityCode": "10P",
      "lobEntityType": "Organization",
      "parentEntityType": "Company Code",
      "parentEntityCode": "101_Inactive",
      "IsUpdateParentEntities": false,
      "isActive": true,
      "parentEntityCodes": [
         "101_Inactive",
         "102_Inactive”
      ],
      "isUpdateParentEntities": false,
      "isMapToAllChildEntity": true,
      "isMapToAllParentEntity": true,
      "address": {
         "AddressLine1": "REMARKABLES PARK",
         "City": "QUEENSTOWN",
         "CountryCode": "NZ",
         "FaxNo": "34423067",
         "PhoneNo": "34423045",
         "StateOther": "ZZ",
         "ZipCode": "00000"
      }
   }
]

 

Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "CC10_Inactive",
         "errors": [
            {
               "errorCode": "DataValidation",
               "errorDescription": "Invalid Entity Type. Validation"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements
 

OrganizationEntity

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.1

EntityType

Yes

String(50)

Entity Type of the entity

  • EntityType is mandatory

  • Max length for EntityCode is 50

1.2

Code

Yes

String(50)

Code of the entity

  • EntityCode is mandatory

  • Max length for EntityCode is 50

1.3

ParentEntityType

Yes

String(50)

Parent Entity Type of the entity

  • ParentEntityType is mandatory

  • Max length for ParentEntityType is 50

1.4

ParentEntityCode

Yes

String

Parent Entity Code of the entity

  • ParentEntityCode is mandatory

  • Max length for ParentEntityCode is 50

1.5

Name

No

String(100)

Name of the entity

 

1.6

LobEntityCode

No

String

Line of Business Entity Code of the entity

 

1.7

LobEntityType

No

String

Line of Business Entity Type of the entity

 

1.8

IsActive

No

Boolean

Status of the entity if active or not

 

1.9

ParentEntityCodes

No

List of String

Parent Entity Codes of the entity

 

1.10

IsUpdateParentEntities

No

Boolean

Status of the updates of parent entity if active or not

 

1.11

IsMapToAllchildEntity

No

Boolean

   

1.12

IsMapToAllParentEntity

No

Boolean

Status of the parent entity if active or not

 

1.13

Address

No

Address object

Check Data Type Address for Details

 

1.14

ParentEntityCodeDelta

No

List of ParentEntityCodeDelta object

Check Data Type ParentEntityCodeDelta for Details

 
 

Address

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.13.1

AddressLine1

No

String (500)

Address line 1 of the entity

 

1.13.2

AddressLine2

No

String

Address line 2 of the entity

 

1.13.3

AddressLine3

No

String (100)

Address line 3 of the entity

 

1.13.4

City

No

String (50)

City of the entity

 

1.13.5

CountryCode

No

String (2)

Country code of the entity

 

1.13.6

FaxNo

No

String (20)

Fax number of the entity

 

1.13.7

PhoneExtension

No

String

Phone extension of the entity

 

1.13.8

PhoneNo

No

String

Phone number of the entity

 

1.13.9

PhoneOther

No

String (20)

Phone 2 of the entity

 

1.13.10

PhoneOtherExtension

No

String

Phone 2’s extension of the entity

 

1.13.11

StateCode

No

String (10)

State code of the entity

 

1.13.12

StateOther

No

String

State name (in case of others) of the entity

 

1.13.13

ZipCode

No

String (10)

Zip code of the entity

 

1.13.14

PoBoxNumber

No

String

   

1.13.15

County

No

String (50)

County of the address

 
 

ParentEntityCodeDelta

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.14.1

EntityCode

No

String

Code of the entity

 

1.14.2

IsActive

No

Boolean

Status of the entity if active or not