Add Commodity Codes with Geometrics - Intergraph Smart Reference Data - Version 2020 (10.0) - Help - Intergraph

Intergraph Smart Reference Data REST API (2020)

Language
English
Product
Intergraph Smart Reference Data
Search by Category
Help
Smart Materials/Smart Reference Data Version
2020 (10.0)

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

CommodityCode

Name of the new commodity code

String

Required

ControlStatus

The control status of the instance

Integer

Optional

Default value is 1

CommodityType

The type of commodity code

String

Optional

Default is TB(Table based). Available commodity types are TB(Table based), AB(Attribute based), CT(Commodity Type), and OT(Other Type).

StandardName

Name of the standard

String

Optional

Information about the standard (DIN, ANSI and so on.

ObjectParameterName

Name of the object parameter. The id of the part-obj-parm intersection is stored here.

String

Optional

NlsId

Language identifier

Integer

Required

ShortDescription

Short description of the commodity code

String

Required

Description

Descriptive text of the commodity code

String

Required

GeometricID

Reference to the

Geometric instance.

Integer

Required

IdentKey

Set this value if you want to use the geometric for building the ident.

String

Optional

Default is Y (Yes)

Sample Request

POST

https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5018)/CommodityParts(5549)/CommodityCodes

{

"CommodityCode": "AddCC_Geometrics",

"ControlStatus": 1,

"CommodityCodeGeometrics": [

{

"GeometricId": 5002,

"IdentKey": "ON"

}]

}

Response

Parameter

Description

Type

Notes

CommodityId

A unique ID for the commodity code.

Integer

CommodityCode

Name of the commodity code.

String

Project

Project details for the selected commodity code.

String

DisciplineId

Discipline ID for the selected project.

Integer

CommodityType

Type of commodity code.

String

Available commodity types are TB(Table based), AB(Attribute based), CT(Commodity Type), and OT(Other Type).

StandardName

Name of the standard

String

ObjectParameterName

Name of the object parameter. The id of the part-obj-parm intersection is stored here.

String

ControlStatus

Control status of the instance.

Integer

CommodityGroupId

The commodity group id of the commodity code.

Integer

CommodityPartId

The object parameter that is associated to the group which is used to generate ident.

Integer

Sample response

{

"@odata.context":

"https://<appserver with domain>/<virtual_directory>/Srd/V2/$metadata#Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5018)/CommodityParts(5549)/CommodityCodes/$entity",

"CommodityId": 111397,

"CommodityCode": "ADDCC_GEOMETRICS",

"Project": "SDB",

"DisciplineId": 5020,

"CommodityType": "TB",

"StandardName": null,

"ObjectParameterName": null,

"ControlStatus": 1,

"CommodityGroupId": 5018,

"CommodityPartId": 5549

}

Use the following sample GET method to view the associated commodity code and the geomteric that you have created:

GET

https://<appserver with domain>/<virtual_directory>/Srd/V2/Projects('SDB')/Disciplines(5020)/Nls(1)/CommodityGroups(5000)/CommodityParts(5544)?$expand=CommodityCodeGeometrics

Where ?$expand=CommodityCodeGeometrics is the query to retrieve the associated geometric records along with the commodity code.