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 |
|---|---|---|---|---|
|
Port |
Port on which Inference Service is running |
Integer |
Required |
|
|
num_codes |
Number of recommended codes |
Integer |
Required |
|
|
text |
Description of the commodity code |
String |
Required |
|
|
details |
Includes detailed information. When set to true, the response includes detailed information (for example, commodity group, part, and table details). |
Boolean |
Optional |
Sample request
GET https://<appserver with domain>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityCodeRecommendations
{
"Port": 5000,
"Requests": [
{
"num_codes": "5",
"details": true,
"text": [
"Spiral Wound Gasket , ASME B16.20, Spiral Wound Gaskets for ASME B16.5 Flanges ,
Class 300 , 316L Stainless Steel , w/flexible graphite filler, w/ 316L SS inner ring
and CS outer ring"
]
}
]
}
Response
|
Element |
Description |
Type |
Notes |
|---|---|---|---|
|
codes |
Recommended commodity code along with accuracy percentage of each recommendation. |
String |
|
|
Group |
Represents the commodity group |
String |
|
|
Part |
Describes the part or component. |
String |
Sample Response
{
""codes"": {
""FSWABLLRFACGZZZZ"": 93.41,
""FSWA***LRFACGZZZZ"": 86.3,
""FSWABL**RFACGZZZZ"": 86.13,
""FSWA*****RFACGZZZZ"": 79.03
},
""data"": [
{
""Group"": {
""desc"": ""Flanges"",
""code"": ""F""
},
""Part"": {
""desc"": ""Socket welded flange"",
""code"": ""SW""
},
]
},