SaveGeneralLedgerDetails (POST)

Overview

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

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/GeneralLedger/GeneralLedgerDetails
 

Request
      {
         "name": "String",
         "code": "String",
         "coaCode": "String",
         "description": "String",
         "isDeleted": true,
         "isActive": true,
         "categories": [
            {
               "pasCode": 0,
               "isDefault": true,
               "clientPasCode": "String",
               "isDeleted": true
            }
         ]
      }

 

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

 

Examples

Success Scenario - Request 

{
   "generalLedgers": [
      {
         "name": "Test02",
         "code": "Test02",
         "coaCode": "1000",
         "description": "21102019",
         "isDeleted": false,
         "isActive": true,
         "categories": [
            {
               "pasCode": 14450250002263,
               "isDefault": true,
               "clientPasCode": "Test1"
            }
         ]
      }
   ]
}

Success Scenario – Response

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

Error Scenario - Request 

Request below has a missing value of the description which is a mandatory attribute:

{
   "generalLedgers": [
      {
         "name": "Test02",
         "code": "Test02",
         "coaCode": "1000",
         "description": "",
         "isDeleted": false,
         "isActive": true,
         "categories": [
            {
               "pasCode": 14450250002263,
               "isDefault": true,
               "clientPasCode": "Test1"
            }
         ]
      }
   ]
}

Error Scenario – Response

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "Test02",
         "errors": [
            {
               "errorCode": "MandatoryField",
               "errorDescription": "Description is Mandatory"
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements
 

Save General ledger details

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

Name

Yes

String

Name of entity

  • Name is mandatory

  • Name should not be greater than 200 characters

2

Code

Yes

String

Code of entity

  • Code is mandatory

  • Code should not be greater than 200 characters

  • Special characters are not allowed in Code

3

Description

Yes

String

Description of entity

  • Description is mandatory

  • Description should not be greater than 1000 character

4

Categories

Yes

List of PAS object

Check data type PAS for details.

  • Invalid Category. Category cannot not be NULL or Empty

  • Invalid PAS level

  • Invalid Category

5

COACode

No

String

Contract of Affreightment Code of entity

  • Invalid Contract of Affreightment

6

IsDeleted

No

Bool

A flag used to denote if entity is soft deleted or not

 

7

IsActive

No

Bool

A flag used to denote if entity is active or not

 
 

Categories

S.No.

Property

Required?

Data type

Description

Validations / Exceptions

4.1

PasCode

No

Long

Pas Code of entity

 

4.2

IsDefault

No

Boolean

Status of the entity if this is default or not

  • Multiple IsDefault

4.3

ClientPasCode

No

String

Client Pas Code of entity

  • Invalid Client Pas Code

4.4

IsDeleted

No

Boolean

status of the entity on whether it should be visible on the application or not