Create an account code structure - Intergraph Smart Materials - Help - Hexagon

Intergraph Smart Materials Web API Help (10.6)

ft:locale
en-US
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.6

This API creates the details of an account code structure and it's items also defined in the given project of Smart Materials.

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’)/AccountCodeStructures

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 structure gets created.

Account Code Structure Elements

Element

Description

Type

Required

Notes

StructureCode

Name (code) of the account code structure.

String

Mandatory

Maximum allowed length is 10.

FixFormatInd

Indicates whether the structure defined here is fixed or not. Available values are Y and N. If set to Y, structure is fixed.

String

Mandatory

Default value is N.

FixFormatFiller

If FixFormatInd is marked to Y, then user must define a fill character in the FixFormatFiller field. Positions in the generated account code that remain empty are filled with this filler character.

String

Optional

Maximum allowed length is 1.

ShortDescription

Short description of the account code structure.

String

Optional

Maximum allowed length is 20.

Description

Description of the account code structure.

String

Optional

Maximum allowed length is 60.

StructureDetails

Elements of the account code structure items.

Collection

Optional

Account Code Structure Item details

Element

Description

Type

Required

Notes

OrderSeq

Sequence number of the structure details.

This sequence number must be unique within the account code structure.

Integer

Mandatory

Max allowed length is 5.

StructureType

Type of the structure details.

Allowed Values:

  • Property

  • Node

  • Tag

  • Separator.

String

Mandatory

PropertyCode

Name of the Attribute/Property if the selected StructureType is Property.

String

Mandatory

Max allowed length is 30.

NodeType

Name of the NodeType if the selected StructureType is Node.

String

Mandatory

Max allowed length is 10.

SeparatorText

Refers to the text defined as separator if the StructureType is Separator.

String

Mandatory

Max allowed length is 70.

RequiredInd

Indicates whether the value of the structure element is mandatory or not.

String

Mandatory

Length

Length of the structure element.

You must define the length if the FixFormatInd in the associated account code structure is set to Y.

Integer

Mandatory

Max allowed length is 2.

Sample Body

To retrieve the created account code structure item details also, use expand query.

POST http://localhost:5237/SMAT/V1/Projects('RS')/Disciplines('PIPING')/Nls('English')/AccountCodeStructures?$Expand=StructureDetails

{

"StructureCode": "USCHITEST",

"FixFormatInd": "Y",

"FixFormatFiller": ",",

"ShortDescription": "mytest",

"Description": "mytest",

"StructureDetails": [

{

"OrderSeq": 1,

"StructureType": "Property",

"PropertyCode": "MAT_CODE",

"NodeType": null,

"SeparatorText": null,

"RequiredInd": "Y",

"Length": 6

},

{

"OrderSeq": 2,

"StructureType": "Property",

"PropertyCode": "MAT_COD2",

"NodeType": null,

"SeparatorText": null,

"RequiredInd": "Y",

"Length": 6

}

]

}

Success Response

Status Code: 201 Created

{

"@odata.context": "https://localhost:7101/smat/v1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/AccountCodeStructures(StructureDetails())",

"value":

{

"JsId": 5021,

"ProjId": "RS",

"StructureCode": "USCHITEST",

"FixFormatInd": "Y",

"FixFormatFiller": ",",

"ShortDescription": "mytest",

"Description": "mytest",

"StructureDetails": [

{

"JsdId": 5001,

"JsId": 5021,

"ProjId": "RS",

"OrderSeq": 1,

"StructureType": "Property",

"PropertyId": 500301,

"PropertyCode": "MAT_CODE",

"HintText": "Mat_Code sd",

"LsId": null,

"NodeType": null,

"ShortDesc": null,

"SeparatorText": null,

"RequiredInd": "Y",

"Length": 6

},

{

"JsdId": 5001,

"JsId": 5021,

"ProjId": "RS",

"OrderSeq": 1,

"StructureType": "Property",

"PropertyId": 500301,

"PropertyCode": "MAT_CODE",

"HintText": "Mat_Code sd",

"LsId": null,

"NodeType": null,

"ShortDesc": null,

"SeparatorText": null,

"RequiredInd": "Y",

"Length": 6

}

]

}

}

Element

Description

Type

JsdId

Unique ID of the created structure details.

Integer

JsId

Unique ID of the created account code structure details.

Integer

PropertyId

Unique ID of the Attribute/Property type structure.

Integer

HintText

Hint text related to the selected PropertyCode and it fills in automatically.

String

LsId

Unique ID of the NodeType if the selected StructureType is Node.

Integer

ShortDesc

Short description of the selected NodeType. It gets filled automatically .

String