SaveOrganizationEntities (POST)

Overview

This POST API can be used to capture new additions in organization details from ERP into GEP SMART to be used as reference in P2P transactions.

 

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

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": "Test-1",
      "code": "Test-1",
      "lobEntityCode": "KEU-SAP",
      "lobEntityType": "Source System",
      "parentEntityType": "Company Code",
      "isActive": true,
      "parentEntityCodes": [
         "PIES"
      ],
      "isUpdateParentEntities": false,
      "Address": {
         "AddressLine1": "REMARKABLES PARK",
         "City": "QUEENSTOWN",
         "CountryCode": "NE",
         "FaxNo": "344230666",
         "PhoneNo": "34423045",
         "StateOther": "ZA",
         "ZipCode": "00000"
      }
   }
]

 

Success Scenario – Response

{
  "data": null,
  "statusCode": "200",
  "errorDetails": [],
  "successDetails": [
    {
      "key": "Test-1|Test-1"
    }
  ]
}

 

Error Scenario 1 - Request

Below request contains a missing value of the mandatory attribute - EntityType:

[
  {
    "name": "Test-1",
    "code": "Test-1",
    "lobEntityCode": "KEU-SAP",
    "lobEntityType": "Source System",
    "parentEntityType": "Company Code",
    "isActive": true,
    "parentEntityCodes": [
      "PIES"
    ],
    "isUpdateParentEntities": false,
    "Address": {
      "AddressLine1": "REMARKABLES PARK",
      "City": "QUEENSTOWN",
      "CountryCode": "NE",
      "FaxNo": "344230666",
      "PhoneNo": "34423045",
      "StateOther": "ZA",
      "ZipCode": "00000"
    }
  }
]

 

Error Scenario 1 – Response

{
  "data": null,
  "statusCode": "400",
  "errorDetails": [
    {
      "key": "Test-1|Test-1",
      "errors": [
        {
          "errorCode": "MandatoryField",
          "errorDescription": "EntityType is Mandatory"
        }
      ]
    }
  ],
  "successDetails": []
}

Error Scenario 2 - Request

Below request contains an invalid attribute- ParentEntityType:

[
  {
    "entityType": "Cost Center",
    "name": "Entity Name_full",
    "code": "New Testing",
    "lobEntityCode": "KEU-SAP",
    "lobEntityType": "Source System",
    "parentEntityType": "testing",
    "parentEntityCode": "This is new Code for entity",
    "isActive": true,
    "parentEntityCodes": [
      "PIES"
    ],
    "isUpdateParentEntities": true,
    "isMapToAllChildEntity": true,
    "isMapToAllParentEntity": true,
    "address": {
      "addressLine1": "37398 main street",
      "addressLine2": "string",
      "addressLine3": "string",
      "city": "Sanata Clara",
      "stateCode": "CA",
      "stateOther": "string",
      "countryCode": "US",
      "zipCode": "89900",
      "faxNo": "7680090987",
      "phoneNo": "4080090000",
      "phoneOther": "N/A",
      "phoneExtension": "1224",
      "phoneOtherExtension": "2980099997",
      "county": "US",
      "poBoxNumber": "171"
    },
    "parentEntityCodeDelta": [
      {
        "entityCode": "PIES",
        "isActive": true
      }
    ]
  }
]

 

Error Scenario 2 – Response

{
  "data": null,
  "statusCode": "400",
  "errorDetails": [
    {
      "key": "Entity Name_full|New Testing",
      "errors": [
        {
          "errorCode": "DataValidation",
          "errorDescription": "Invalid Parent Entity Type. Following Parent Entity Codes are invalid"
        }
      ]
    }
  ],
  "successDetails": []
}

 

Data Elements
 OrganizationEntity
S.No.PropertyRequired?Data typeDescriptionValidations/Exceptions
1.1EntityTypeYesString(50)Entity Type of the entity
  • Max length is 50
  • Invalid Entity Type
  • EntityType is mandatory
1.2NameYesString(100)Name of the entity
  • Max length is 100
  • EntityName is mandatory
1.3CodeYesString(50)Code of the entity
  • Max length is 50
  • No OrgEntity Code found
  • EntityCode is mandatory
1.4LOBEntityCodeYesStringLine of Business Entity Code of the entity
  • Invalid LOB Entity Code
  • LOBEntityCode is required
1.5LOBEntityTypeYesStringLine of Business Entity Type of the entity
  • Invalid LOB Entity Type
  • LOBEntityType is required
1.6ParentEntityTypeYesString(50)Parent Entity Type of the entity
  • Max length for ParentEntityType is 50
  • ParentEntitytype is mandatory
  • Invalid Parent Entity Type
1.7ParentEntityCodeYesStringParent Entity Code of the entity
  • Max length for ParentEntityCode is 50
  • ParentEntityCode is mandatory
  • Invalid Parent Entity Code <ParentEntityCode>.
1.8ParentEntityCodesNoList of StringParent Entity Codes of the entity 
1.9IsActiveNoBooleanStatus of the entity if active or not 
1.10IsUpdateParentEntitiesNoBooleanStatus of the updates of parent entity if active or not 
1.11IsMapToAllchildEntityNoBoolean  
1.12IsMapToAllParentEntityNoBooleanStatus of the parent entity if active or not 
1.13AddressNoAddress objectCheck Data Type Address for Details 
1.14ParentEntityCodeDeltaNoList of ParentEntityCodeDelta objectCheck Data Type ParentEntityCodeDelta for Details 
 Address
S.No.PropertyRequired?Data typeDescriptionValidations / Exceptions
1.13.1AddressLine1YesString (500)Address line 1 of the entity
  • AddressLine1 is mandatory
  • Max length for AddressLine1 is 500
1.13.2CityYesString (50)City of the entity
  • City is mandatory
  • Max length for City is 50
1.13.3CountryCodeYesString (2)Country code of the entity
  • CountryCode is mandatory
  • Max length for CountryCode is 2
  • Invalid Country
1.13.4StateCodeYesString (10)State code of the entity
  • StateCode is mandatory
  • Max length for StateCode is 10
  • Invalid State
1.13.5ZipCodeYesString (10)Zip code of the entity
  • ZipCode is mandatory
  • Max length for ZipCode is 10
1.13.6AddressLine2NoStringAddress line 2 of the entity
  • Max length for AddressLine2 is 500
1.13.7AddressLine3NoString (100)Address line 3 of the entity
  • Max length for AddressLine3 is 100
1.13.8FaxNoNoString (20)Fax number of the entity
  • Max length for FaxNo is 20
  • Special characters and spaces are not allowed for Fax number except these +(-./ )#@&
1.13.9PhoneExtensionNoStringPhone extension of the entity
  • Max length for Phone Extension is 10
1.13.10PhoneNoNoStringPhone number of the entity
  • Max length for PhoneNo is 50
  • Special characters and spaces are not allowed for phone except these +(-./ )#@&

     

1.13.11PhoneOtherNoString (20)Phone 2 of the entity
  • Max length for PhoneOther is 20
  • Special characters and spaces are not allowed for PhoneOther except these +(-./ )#@&
1.13.12PhoneOtherExtensionNoStringPhone 2’s extension of the entity
  • Max length for PhoneOtherExtension is 10
1.13.13StateOtherNoStringState name (in case of others) of the entity
  • Max length for StateOther is 50
1.13.14PoBoxNumberNoString  
1.13.15CountyNoString (50)County of the address
  • Max length for County is 50
 ParentEntityCodeDelta
S.No.PropertyRequired?Data typeDescriptionValidations / Exceptions
1.14.1EntityCodeNoStringCode of the entity 
1.14.2IsActiveNoBooleanStatus of the entity if active or not