SaveOrgEntityManagers (POST)

Overview

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

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/OrganizationManager/OrgManagers

Request
[
   {
      "entityCode": "string",
      "managerCode": [
         "string"
      ],
      "thresholdAmount": 0,
      "currencyCode": "string",
      "isDeleted": true,
      "structureName": "string",
      "orgEntities": [
         {
            "entityCode": "string",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ]
   }
]

 

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

 

Examples

Success Scenario - Request
Below request only contains mandatory attributes:

[
   {
      "entityCode": "GUBR",
      "managerCode": [
         "CC-2016.000071"
      ],
      "thresholdAmount": 0,
      "currencyCode": "USD",
      "isDeleted": true,
      "structureName": "string",
      "orgEntities": [
         {
            "entityCode": "GUBR",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ]
   },
   {
      "entityCode": "GUCH",
      "managerCode": [
         "CC-2016.000071"
      ],
      "thresholdAmount": 0,
      "currencyCode": "USD",
      "isDeleted": true,
      "structureName": "string",
      "orgEntities": [
         {
            "entityCode": "",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ]
   }
]

Success Scenario – Response

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

Error Scenario - Request
Below request contains a missing value of a mandatory attribute – EntityCode: 

[
   {
      "managerCode": [
         "CC-2016.000071"
      ],
      "thresholdAmount": 0,
      "currencyCode": "USD",
      "isDeleted": true,
      "structureName": "string",
      "orgEntities": [
         {
            "entityCode": "",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ]
   },
   {
      "entityCode": "GUCH",
      "managerCode": [
         "CC-2016.000071"
      ],
      "thresholdAmount": 0,
      "currencyCode": "USD",
      "isDeleted": true,
      "structureName": "string",
      "orgEntities": [
         {
            "entityCode": "",
            "isDefault": true,
            "entityType": "string",
            "lobEntityCode": "string"
         }
      ]
   }
]

Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "Exception",
         "errors": [
            {
               "errorCode": "Exception",
               "errorDescription": "Error occurred while saving OrgEntity Managers Information."
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements
 

OrgEntityManagers

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

EntityCode

Yes

String(50)

Code of the entity

  • If entity id is available: Entity Code is mandatory

  • Max length for Entity Code is 50

  • Invalid Entity Code

2

ManagerCode

Yes

List of String

Manager Code of the entity

  • If entity id is not available: Manager Code is mandatory

  • Invalid Manager Code

  • At least One manager is mandatory

3

StructureName

Yes

String

Structure Name of the entity

  • If entity id is not available: Structure Name is mandatory

  • If StructureID is not available: Invalid structure

  • If StructureID is available:

  • Org entities do not match with the structure

4

ThresholdAmount

No

Decimal

Threshold Amount of the entity

 

5

CurrencyCode

No

String

Currency Code of the entity

  • If entity id is available: Max length for Currency Code is 3

  • Invalid Currency Code

6

IsDeleted

No

String

Status of the entity if they are to be visible or not on the application

 

7

OrgEntities

No

List of OrgEntity object

Check data type OrgEntity for details

 
 

OrgEntities

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

7.1

EntityCode

Yes

String

Entity Code of entity

  • If entity id is not available: OrgEntity/Entity Code is mandatory

  • Invalid Entity Code

7.2

EntityType

Yes

String

Entity Type of entity

  • If entity id is not available: Entity Type is mandatory

  • Invalid Entity Type

7.3

LOBEntityCode

Yes

String

Line of Business Entity Code of entity

  • If entity id is not available: LOB Entity Code is mandatory

  • Invalid LOB Entity Code

7.4

IsDefault

No

Boolean

Status of the entity if this is default or not