GetBudgetAllocations (POST)

Overview

This GET API can be used to retrieve Budget Allocation details in GEP SMART to post them into ERP.

 

URL Format: https://<Instance>/SmartInterfaceAPI/api/BudgetAllocation /GetBudgetAllocations

Request
{
   "periodCode": "String",
   "periodType": " String",
   "accountCodes": [
      {
         "entityCode": " String",
         "isDefault”:false,
         "lobEntityCode": "String"
      }
   ]
}

 

Response
{
   "data": [
      {
         "periodCode": "String",
         "periodType": "String",
         "accountCodes": [
            {
               "entityCode": "String",
               "isDefault": false,
               "entityType": "String"
            }
         ],
         "currencyCode": "String",
         "allocatedBudget": 0,
         "committedAmount": 0,
         "obligatedAmount": 0,
         "expensedAmount": 0,
         "availableAmount": 0,
         "overallBudget": 0,
         "isActive": true
      }
   ],
   "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:

{
   "periodCode": "2018",
   "periodType": "Month",
   "accountCodes": [
      {
         "entityCode": "A-18-00026-01",
         "isDefault": false,
         "entityType": "WBS"
      }
   ]
}

 

Success Scenario - Response 

{
   "data": [
      {
         "periodCode": "2018",
         "periodType": "Month",
         "accountCodes": [
            {
               "entityCode": "A-18-00026-01",
               "isDefault": false,
               "entityType": "WBS"
            }
         ],
         "currencyCode": "EUR",
         "allocatedBudget": 15000.12,
         "committedAmount": 0,
         "obligatedAmount": 0,
         "expensedAmount": 0,
         "availableAmount": 5000,
         "overallBudget": 0,
         "isActive": true
      }
   ],
   "statusCode": "200",
   "errorDetails": [],
   "successDetails": [
      {
         "key": "2018"
      }
   ]
}

 

Error Scenario - Request 

{
   "periodCode": "20188",
   "periodType": "Month",
   "accountCodes": [
      {
         "entityCode": "A-18-00026-01",
         "isDefault": false,
         "entityType": "WBS"
      }
   ]
}

 

Error Scenario - Response 

{
   "data": null,
   "statusCode": "400",
   "errorDetails": [
      {
         "key": "20188",
         "errors": [
            {
               "errorCode": "DataValidation",
               "errorDescription": "PeriodCode is invalid or not exists in Calendar Period. No records found."
            }
         ]
      }
   ],
   "successDetails": []
}

 

Data Elements
 

Get Budget allocations

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1

Data

 

List of BudgetAllocation object

   

2

StatusCode

 

String

   

3

ErrorDetails

 

List of ErrorModel object

   

4

SuccessDetails

 

List of SuccessModel object

   
 

Data

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.1

PeriodCode

 

String

Code of Budget Allocation Period

 

1.2

PeriodType

 

String

Type of Budget Allocation Period

 

1.3

AccountCodes

 

List of OrgEntity object

Codes of account

 

1.4

CurrencyCode

 

String

Code of currency

 

1.5

AllocatedBudget

 

Decimal

Allocated budget

 

1.6

CommittedAmount

 

Decimal

Committed amount

 

1.7

ObligatedAmount

 

Decimal

Obligated amount

 

1.8

ExpensedAmount

 

Decimal

Expensed amount

 

1.9

AvailableAmount

 

Decimal

Available amount

 

1.10

OverallBudget

 

Decimal

Overall budget

 

1.11

IsActive

 

Boolean

Is active

 
 

AccountCodes

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

1.3.1

EntityCode

 

String

Entity Code of entity

 

1.3.2

EntityType

 

String

Entity Type of entity

 

1.3.3

IsDefault

 

Boolean

Status of the entity if this is default or not

 

1.3.4

LOBEntityCode

 

String

Line of Business Entity Code of entity

 
 

ErrorDetails

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

3.1

Key

 

String

   

3.2

Errors

 

List of Error object

   
 

Errors

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

3.2.1

ErrorCode

 

String

   

3.2.2

ErrorDescription

 

String

   
 

SuccessDetails

S.No.

Property

Required?

Data type

Description

Validations/Exceptions

4.1

Key

 

String