Add Commodity Rule NLS and Details - Intergraph Smart Reference Data - Help - Intergraph

Intergraph Smart Reference Data REST API (10.2)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.2

Headers

Header name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/json

POST body

Element

Description

Type

Required

Notes

CommodityRuleName

Name of the commodity rule

String

Required

ControlStatus

Sets the control status of the commodity rule

Integer

Optional

Default is 1

NlsId

Language identifier

Integer

Required

ShortDescription

Short description of the table

String

Required

Description

Description of the table

String

Required

SeqId

Rule details identifier

Integer

Generated by the software.

TableId

A unique ID for the table.

Required

The table id must only be from the commodity attribute tables.

Required

Specifies if the new commodity rule is mandatory for a commodity code

String

Optional

Available values are ON and OFF.

Default is ON.

ShDes

Specifies if the short description is used in commodity code

String

Optional

Available values are ON and OFF.

Default is ON.

LgDes

Specifies if the long description is used in commodity code

String

Optional

Available values are ON and OFF.

Default is ON.

MultipleUse

Specify if the commodity rule can be used more than once for a commodity code

String

Optional

Available values are Y and N.

Default is N.

Options

Required properties for Standard Product Group and Project versus required properties of Proposal Project

String

Optional

Default is SP.

Other values available are BO and PP.

Where:

SP = Project Only

BO = Proposal and Project

PP= Proposal Only

SpecTemplateInd

Specify if the corresponding table is considered as commodity attribute for a component group

Optional

Available values are Y and N.

Default value is N.

Sample Request

POST https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules

{

"CommodityRuleName": "Add_TD_NLS",

"Project": "SDB",

"ControlStatus": 1,

"CommodityRuleNls": [

{

"NlsId": 1,

"ControlStatus": 1,

"ShortDescription": "No Rating Fittings",

"Description": "No Rating Fittings"

}

],

"CommodityRuleDetails": [

{

"TableId":10372,

"ControlStatus":1,

"Required":"ON",

"LgDes":"ON",

"MultipleUse":"N",

"Options":"SP"

}

]

}

Response

Element

Description

Type

Notes

CommodityRuleId

A unique ID for the commodity rule.

Integer

Project

The project or product group from where the table is retrieved.

String

CommodityRuleName

Name of the commodity rule

String

ControlStatus

Retrieves the control status of the instance.

SeqId

Rule details identifier

Integer

Generate by the software.

TableId

A unique ID for the table.

Integer

The table id must only be from the commodity attribute tables.

Required

Specifies if the new commodity rule is mandatory for a commodity code

String

Available values are ON and OFF.

Default is ON.

The value must be in uppercase.

ShDes

Specifies if the short description is used in commodity code

String

Available values are ON and OFF.

Default is ON.

The value must be in uppercase.

LgDes

Specifies if the long description is used in commodity code

String

Available values are ON and OFF.

Default is ON.

The value must be in uppercase.

Options

Required properties for Standard Product Group and Project versus required properties of Proposal Project

String

Default is SP.

Other values available are BO and PP.

Where:

SP = Project Only

BO = Proposal and Project

PP= Proposal Only

The value must be in uppercase.

SpecTemplateInd

Specify if the corresponding table is considered as commodity attribute for a component group

String

Available values are Y and N.

Default value is N.

The value must be in upper case

Sample Response

{

"@odata.context":

"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules",

"value": [

{

"CommodityRuleId": 5000,

"Project": "SDB",

"CommodityRuleName": "P_NRA_FITT",

"ControlStatus": 1,

"CommodityRuleDetails@odata.context":

"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules(5000)(5000)/CommodityRuleDetails",

"CommodityRuleDetails": [

{

"CommodityRuleId": 5000,

"SeqId": 1,

"TableId": 10372,

"ControlStatus": 1,

"Required": "ON",

"ShDes": "ON",

"LgDes": "ON",

"MultipleUse": "N",

"Options": "SP",

"SpecTemplateInd": "N"

}

}

Use the following sample GET method to view the associated commodity rule, commodity rule, and commodity rule Nls details that you have created:

GET

https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules(5000)?$expand=CommodityRuleDetails, CommodityRuleNls

Where ??$expand=CommodityRuleDetails is the query to retrieve the associated commodity rule details records along with the commodity rule.