SaveOrganizationEntitiesWithToken (POST)

Overview

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

 

URL Format: https://<Instance>/SmartBulkInterfaceAPI/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"
      }
   }
]

 

Response
{
   "statusCode": 202,
   "url": "string",
   "batchID": "string",
   "interval": 0,
   "interval Type": "string",
   "receivedCount": 0
}

 

Examples

Success Scenario - Request

Below request only contains mandatory attributes:

 
 

[
  {
    "Code": "85f45437-42da-45af-9660-19670f3cb8c0",
    "EntityType": "Division",
    "IsActive": "true",
    "IsUpdateParentEntities": "false",
    "LOBEntityCode": "SAP_PC2",
    "LOBEntityType": "Division",
    "ParentEntityCode": "9500",
    "Name": "9a449236-5de4-4f3a-a161-5d0691a7dedd",
    "ParentEntityCodes": [
      "9500"
    ],
    "ParentEntityType": "Division",
    "isMapToAllChildEntity": "false",
    "isMapToAllParentEntity": "false"
  }
]

 

Success Scenario - Response

{
  "statusCode": 202,
  "url": "https://api-smartdev.gep.com/SmartBulkInterfaceAPI/api/BulkResult/GetBulkResult?batchId=b5ae83cd486344cca1da7fa171cfeeb0",
  "batchID": "b5ae83cd486344cca1da7fa171cfeeb0",
  "interval": 60,
  "interval Type": "Seconds",
  "receivedCount": 1000
}

Error Scenario - Request
Request below describes if we provide incorrect input data: (400 – Bad Request)

[
   {
      "Code": "85f45437-42da-45af-9660-19670f3cb8c0",
      "EntityType": "Division",
      "IsActive": "true",
      "IsUpdateParentEntities": "false",
      "LOBEntityCode": "SAP_PC2",
      "LOBEntityType": "Division",
      "ParentEntityCode": "9500",
      "Name": "9a449236-5de4-4f3a-a161-5d0691a7dedd",
      "ParentEntityCodes": [
         "9500"
      ],
      "ParentEntityType": "Division",
      "isMapToAllChildEntity": "false",
      "isMapToAllParentEntity": "false"
   }
]

    Error Scenario - Response

{
   "[999]": [
      "JsonToken EndArray is not valid for closing JsonType Object. Path '[999]', line 14002, position 1.",
      "Unexpected end when deserializing array. Path '[999]', line 14002, position 1."
   ]
}

 

Data Elements
 

OrganizationEntity

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.1

EntityType

Yes

String(50)

Entity Type of the entity

  • Max length is 50

  • Invalid Entity Type

  • EntityType is mandatory

1.2

Name

Yes

String(100)

Name of the entity

  • Max length is 100

  • EntityName is mandatory

1.3

Code

Yes

String(50)

Code of the entity

  • Max length is 50

  • No OrgEntity Code found

  • EntityCode is mandatory

1.4

LOBEntityCode

Yes

String

Line of Business Entity Code of the entity

  • Invalid LOB Entity Code

  • LOBEntityCode is required

1.5

LOBEntityType

Yes

String

Line of Business Entity Type of the entity

  • Invalid LOB Entity Type

  • LOBEntityType is required

1.6

ParentEntityType

Yes

String(50)

Parent Entity Type of the entity

  • Max length for ParentEntityType is 50

  • ParentEntitytype is mandatory

  • Invalid Parent Entity Type

1.7

ParentEntityCode

Yes

String

Parent Entity Code of the entity

  • Max length for ParentEntityCode is 50

  • ParentEntityCode is mandatory

  • Invalid Parent Entity Code

1.8

ParentEntityCodes

No

List of String

Parent Entity Codes of the entity

 

1.9

IsActive

No

Boolean

Status of the entity if active or not

 

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

 
 

Address

S.No.

Property

Required?

Data type

Description

Validations / Exceptions

1.13.1

AddressLine1

Yes

String (500)

Address line 1 of the entity

  • AddressLine1 is mandatory

  • Max length for AddressLine1 is 500

1.13.2

City

Yes

String (50)

City of the entity

  • City is mandatory

  • Max length for City is 50

1.13.3

CountryCode

Yes

String (2)

Country code of the entity

  • CountryCode is mandatory

  • Max length for CountryCode is 2

  • Invalid Country

1.13.4

StateCode

Yes

String (10)

State code of the entity

  • StateCode is mandatory

  • Max length for StateCode is 10

  • Invalid State

1.13.5

ZipCode

Yes

String (10)

Zip code of the entity

  • ZipCode is mandatory

  • Max length for ZipCode is 10

1.13.6

AddressLine2

No

String

Address line 2 of the entity

  • Max length for AddressLine2 is 500

1.13.7

AddressLine3

No

String (100)

Address line 3 of the entity

  • Max length for AddressLine3 is 100

1.13.8

FaxNo

No

String (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.9

PhoneExtension

No

String

Phone extension of the entity

  • Max length for Phone Extension is 10

1.13.10

PhoneNo

No

String

Phone number of the entity

  • Max length for PhoneNo is 50

  • Special characters and spaces are not allowed for phone except these +(-./ )#@&

     

1.13.11

PhoneOther

No

String (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.12

PhoneOtherExtension

No

String

Phone 2’s extension of the entity

  • Max length for PhoneOtherExtension is 10

1.13.13

StateOther

No

String

State name (in case of others) of the entity

  • Max length for StateOther is 50

1.13.14

PoBoxNumber

No

String

   

1.13.15

County

No

String (50)

County of the address

  • Max length for County is 50