GetCombinationCodes (POST)

Overview

This GET API can be used to retrieve combination code details in GEP SMART to post them in ERP.

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/CombinationCodes/CombinationCodes

Request
{
   "orgEntity": [
      {
         "entityCode": " String ",
         "isDefault": true,
         "entityType": "String",
         "lobEntityCode": "String"
      }
   ],
   "pageIndex": 0,
   "pageSize": 0
}

 

Response
{
   "data": [
      {
         "code": "String",
         "status": "String",
         "lstOrgEntity": [
            {
               "entityCode": "String",
               "isDefault": false,
               "entityType": "String",
               "lobEntityCode": "String"
            },
            {
               "entityCode": "String",
               "isDefault": false,
               "entityType": "String",
               "lobEntityCode": "String"
            }
         ]
      }
   ],
   "statusCode": "String",
   "errorDetails": [
      {
         "key": "string",
         "errors": [
            {
               "errorCode": "string",
               "errorDescription": "string"
            }
         ]
      }
   ],
   "successDetails": [
      {
         "key": "string"
      }
   ]
}

 

Examples

Success Scenario - Request 
Request below describes that this contains only the mandatory attributes:

{
   "orgEntity": [
      {
         "entityCode": "001",
         "isDefault": true,
         "entityType": "Organization",
         "lobEntityCode": ""
      }
   ],
   "pageIndex": 1,
   "pageSize": 10
}

 

Success Scenario - Response 

{
   "data": [
      {
         "code": "44444444|4|44444444|*|*|100000|0000|Ohio",
         "status": "\u0000",
         "lstOrgEntity": [
            {
               "entityCode": "001",
               "isDefault": false,
               "entityType": "Organization",
               "lobEntityCode": "001"
            },
            {
               "entityCode": "CBV",
               "isDefault": false,
               "entityType": "BusinessUnit",
               "lobEntityCode": "001"
            }
         ]
      }
   ],
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": []
}

 

Error Scenario - Request 

{
   "orgEntity": [
      {
         "entityCode": "0011",
         "isDefault": true,
         "entityType": "Organization",
         "lobEntityCode": ""
      }
   ],
   "pageIndex": 1,
   "pageSize": 10
}

 

Error Scenario - Response

{
   "data": [],
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "0011, Organization",
         "errors": [
            {
               "errorCode": "DataValidation",
               "errorDescription": "Invalid EntityCode"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements
 

CombinationCode

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

Code

Yes

String

Code of Entity

  • Code is mandatory

  • Validation failed for code combination. Number of codes are not matching with entities configured

2

Status

No

Char

Status of the entity

 

3

LstOrgEntity

No

List of OrgEntity object

Check data type OrgEntity for details 

 
 

LstOrgEntity

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

3.1

EntityCode

No 

String 

Entity Code of the entity 

  • Invalid EntityCode

3.2

IsDefault

No

Boolean 

A flag used to denote if entity is the default or not 

 

3.3

EntityType

No 

String 

Entity Type of the entity 

  • Invalid EntityType

3.4

LOBEntityCode

No 

String 

Line of Business Entity Code of the entity 

  • Invalid LOBEntityCode