This API creates the account code in the given project of Smart Materials. You can create account codes by using existing account code structure details or without it also.
Required Privilege: API_ACCOUNT_CODE
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
POST https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/AccountCodes
Specify the values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the account code details are created.
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
JobNumber |
Unique name of the account code within the login project.
|
String |
Mandatory/Optional |
Maximum allowed length is 70. |
JobStructureCode |
Unique name of the structure used for creating the account code.
|
String |
Mandatory/Optional |
Maximum allowed length is 10 |
Field1-7 |
These fields defines the name of JobNumber, when JobNumber is not provided by user. |
String |
Mandatory/ |
Maximum allowed length is 100. |
PlannedBudget |
Refers to the planned budget that is given while creating the account code. |
Integer |
Optional |
|
CurrencyCode |
Unique name of the currency used for budget. |
String |
Mandatory |
Maximum allowed length is 10. |
ShortDesc |
Short description of the account code. |
String |
Optional |
Maximum allowed length is 20. |
Description |
Description of the account code |
String |
Optional |
Maximum allowed length is 60. |
Sample Body
POST https://{host}/Smat/V1/Projects('RS')/Disciplines('PIPING')/NLS('ENGLISH')/AccountCodes
{
"JobNumber": null,
"JobStructureCode": "NIK_TEST1",
"Field1": "ACC",
"Field2": "CODES",
"Field3": "AUTO",
"Field4": "DUMMY1",
"Field5": "DUMM2",
"Field6": null,
"Field7": null,
"PlannedBudget": 70,
"CurrencyCode": "€",
"ShortDesc": "Creating Account Code",
"Description": null
}
Success Response
Status Code: 201 Created
{
"@odata.context": "https://localhost:7101/smat/v1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/AccountCodes/$entity",
"JobId": 10006850218,
"ProjId": "RS",
"JobNumber": "ACC**CODEASDEAUTO567",
"JobStructureCode": "NIK_TEST1",
"JsId": 10000001886,
"Field1": "ACC**",
"Field2": "CODE",
"Field3": "AUTO",
"Field4": null,
"Field5": null,
"Field6": null,
"Field7": null,
"RevisedBudget": 70,
"PlannedBudget": 70,
"UnitId": 500391,
"CurrencyCode": "€",
"ShortDesc": "Creating Account Code",
"Description": "Creating Account Code"
}
Element |
Description |
Type |
---|---|---|
JobId |
Unique ID of the account code. |
Integer |
JsId |
Unique ID of the account code structure details. |
Integer |
RevisedBudget |
Refers to the revised budget having same value as Original Budget while creating the account code. |
Integer |
UnitId |
Unique ID of the currency used for the budget. |
Integer |