Sample URI request
To retrieve all the commodity groups with Nls:
GET
https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('TRAINPROJ')/Disciplines(5020)/Nls(1)/CommodityGroups?$expand=CommodityGroupNls
Where ?$expand=CommodityGroupNls is the query to retrieve Nls records along with the commodity group.
To retrieve a commodity group with Nls for a specific Id:
GET
https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('TRAINPROJ')/Disciplines(5020)/Nls(1)/CommodityGroups(<CommodityGroupId>)?$expand=CommodityGroupNls
Headers
Header name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/json |
Response
Parameter |
Description |
Type |
Notes |
---|---|---|---|
CommodityGroupId |
A unique ID for the commodity group |
Integer |
|
CommodityGroupName |
Name of the commodity group |
String |
|
ControlStatus |
Retrieves the control status of the instance |
Integer |
|
DisciplineId |
Retrieves the discipline details for the selected commodity group. |
Integer |
|
Project |
Retrieves the project details for the selected commodity group. |
String |
|
CommodityRuleId |
The rules that is associated to the group which is used to generate commodity code. |
Integer |
|
StandardName |
Name of the standard |
String |
|
ObjectParameterId |
The object parameter that is associated to the group which is used to generate ident. |
Integer |
|
ANGLE |
ANGLE attribute is associated with ATTR_CHAR1 physical attribute for M_COMMODITY_GROUPS physical table. |
String |
|
CRPF |
CRPF attribute is associated with ATTR_NUM1 physical attribute for M_COMMODITY_GROUPS physical table |
Integer |
|
NlsId |
Language identifier |
Integer |
|
ShortDescription |
Short description of the table |
String |
|
Description |
Description of the table |
String |
Sample Response
{
"@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups/$entity",
"CommodityGroupId": 5000,
"CommodityGroupName": "B",
"ControlStatus": 1,
"DisciplineId": 5020,
"Project": "SDB",
"CommodityRuleId": 5005,
"StandardName": null,
"ObjectParameterId": null,
"ANGLE": "A",
"CRPF": 1.2,
"CommodityGroupNls@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5000)/CommodityGroupNls",
"CommodityGroupNls": [
{
"CommodityGroupId": 5000,
"NlsId": 1,
"ControlStatus": 1,
"ShortDescription": "BW Fittings111",
"Description": "BW(In-Line, Branch, End, Direction Change) Fittings"
},
{
"CommodityGroupId": 5000,
"NlsId": 19,
"ControlStatus": 1,
"ShortDescription": "BW Fittings",
"Description": "Butt Weld Fittings"
},
{
"CommodityGroupId": 5000,
"NlsId": 2,
"ControlStatus": 1,
"ShortDescription": "BW Fittings",
"Description": "BW Fittings"
}
],
"CommodityGroupNls@odata.nextLink":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5000)/CommodityGroupNls?%24skip=3"
}
To retrieve specific NLS data based on composite keys:
GET
https://<appserver with domain>/<virtual_directory>/srd/v2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5018)/CommodityGroupNls(CommodityGroupId=5018,NlsId=1)
Sample Response
{
"@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5018)/CommodityGroupNls/$entity",
"CommodityGroupId": 5018,
"NlsId": 1,
"ControlStatus": 1,
"ShortDescription": "Butterfly Valves",
"Description": "Butterfly Valves"
}