Headers
Header name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/json |
PUT body
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
CommodityGroupName |
Name of the commodity group that you want to edit |
String |
Optional |
|
CommodityRuleId |
The rules that is associated to the group to generate commodity code |
Integer |
Optional |
|
ObjectParameterId |
The object parameter that is associated to the group to generate ident. |
Integer |
Optional |
|
StandardName |
Name of the standard. |
String |
Optional |
Information about the standard (DIN, ANSI and so on.) |
ControlStatus |
Control status of the instance |
Integer |
Optional |
Default value is 1 |
ANGLE |
ANGLE attribute is associated with ATTR_CHAR1 physical attribute for M_COMMODITY_GROUPS physical table |
String |
Depends on required field of TableAttributes mapping |
|
CRPF |
CRPF attribute is associated with ATTR_NUM1 physical attribute for M_COMMODITY_GROUPS physical table |
Integer |
Depends on required field of TableAttributes mapping |
|
ShortDescription |
Short description of the table |
String |
Required |
|
Description |
Description of the table |
String |
Required |
Sample request
PUT https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(<CommodityGroupId>)
Where CommodityGroupId is the commodity rule that you want to edit.
{
"CommodityGroupName": "Edit_CGNls",
"ControlStatus": 1,
"CommodityRuleId": null,
"StandardName": "ANSI",
"ObjectParameterId": null,
"ANGLE": "A",
"CRPF": 1.2,
"CommodityGroupNls": [
{
"NlsId": 1,
"ControlStatus": 1,
"ShortDescription": "Discs",
"Description": "Discs"
}
]
}
Response
Parameter |
Description |
Type |
Notes |
---|---|---|---|
CommodityGroupId |
A unique ID for the commodity group |
Integer |
|
CommodityGroupName |
Name of the commodity group |
String |
|
ControlStatus |
Control status of the instance |
Integer |
|
DisciplineId |
The discipline details for the selected commodity group. |
Integer |
|
Project |
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 |
Sample response
{
"@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('TRAINPROJ')/Disciplines(5020)/Nls(1)/CommodityGroups/$entity",
"CommodityGroupId": 5606,
"CommodityGroupName": "Edit_CGNLS",
"ControlStatus": 1,
"DisciplineId": 5020,
"Project": "TRAINPROJ",
"CommodityRuleId": null,
"StandardName": null,
"ObjectParameterId": null,
"ANGLE": "A",
"CRPF": 1.2
}
Use the following sample GET method to view the associated commodity group and the
Nls that you have created:
GET
https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('TRAINPROJ')/Disciplines(5020)/Nls(1)/CommodityGroups(<CommodityGroupId>)?$expand=CommodityGroupNls
Where ?$expand=CommodityGroupNls is the query to retrieve the associated Nls records.