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
{
"name": "String",
"code": "String",
"coaCode": "String",
"description": "String",
"isDeleted": true,
"isActive": true,
"categories": [
{
"pasCode": 0,
"isDefault": true,
"clientPasCode": "String",
"isDeleted": true
}
]
}
{
"data": null,
"statusCode": "String",
"errorDetails": [
{
"key": "string",
"errors": [
{
"errorCode": "string",
"errorDescription": "string"
}
]
}
],
"successDetails": [
{
"key": " String "
}
]
}
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": []
}
Save General ledger details |
|||||
S.No. |
Property |
Required? |
Data type |
Description |
Validations/Exceptions |
1 |
Name |
Yes |
String |
Name of entity |
|
2 |
Code |
Yes |
String |
Code of entity |
|
3 |
Description |
Yes |
String |
Description of entity |
|
4 |
Yes |
List of PAS object |
Check data type PAS for details. |
|
|
5 |
COACode |
No |
String |
Contract of Affreightment Code of entity |
|
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 |
|
4.3 |
ClientPasCode |
No |
String |
Client Pas Code of entity |
|
4.4 |
IsDeleted |
No |
Boolean |
status of the entity on whether it should be visible on the application or not |