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 |
Updates the name of the commodity rule |
String |
Optional |
|
ControlStatus |
Updates the control status of the commodity rule |
Integer |
Optional |
|
NlsId |
Language identifier |
Integer |
Required |
|
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)/CommodityRules(<CommodityRuleId>)
Where CommodityRuleId is the commodity rule that you want to edit.
{
"CommodityRuleName": "EDIT_CRNLS",
"Project": "SDB",
"ControlStatus": 1,
"CommodityRuleNls": [
{
"NlsId": 1,
"ControlStatus": 1,
"ShortDescription": "Edit Rating Fittings",
"Description": "No Rating Fittings"
}
]
}
Response
Element |
Description |
Type |
Notes |
---|---|---|---|
NlsId |
Language identifier |
Integer |
|
ShortDescription |
Retrieves the short description of the table |
String |
|
Description |
Retrieves the description of the table |
String |
Sample response
{
"@odata.context":
"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules/$entity",
"CommodityRuleId": 5533,
"Project": "SDB",
"CommodityRuleName": "EDIT_CRNLS",
"ControlStatus": 1,
}
Use the following sample GET method to view the associated commodity rule and the Nls that you have created:
GET
https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityRules(5544)?$expand=CommodityRuleNls
Where ?$expand=CommodityRuleNls is the query to retrieve the associated Nls records along with the commodity rule.
You can also edit commodity details using the PUT method. Refer Add Commodity Rule NLS and Details for more details.