SaveCombinationCodes (POST)

Overview

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

 

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

Request
[
   {
      "code": "String",
      "status": 0,
      "lstOrgEntity": [
         {
            "entityCode": "String",
            "isDefault": true,
            "entityType": "String",
            "lobEntityCode": "String"
         }
      ]
   }
]

 

Response
{
   "data": null,
   "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:

[
   {
      "code": "838b9|1111|11|101010|11111|*|*|*|*",
      "status": 65,
      "lstOrgEntity": [
         {
            "entityCode": "CBAD",
            "isDefault": 1,
            "entityType": "BusinessUnit",
            "lobEntityCode": "KNA-SAP"
         }
      ]
   }
]

 

Success Scenario – Response

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

 

Error Scenario - Request 
Below request contains a mismatch value of the mandatory attribute -code:

[
   {
      "code": "1",
      "status": "A",
      "lstOrgEntity": [
         {
            "entityCode": "Test1forKEU28941-1",
            "isDefault": true,
            "entityType": "Cost Center",
            "lobEntityCode": "100"
         }
      ]
   }
]

 

Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "1 A",
         "errors": [
            {
               "errorCode": "DataValidation",
               "errorDescription": "Validation failed for code combination. Number of codes are not matching with entities configured."
            }
         ]
      }
   ],
   "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