CommodityCodes - Intergraph Smart Materials - Version 2017 (2.0) - Help - Hexagon PPM

Intergraph Smart Materials Web API Help 2017 (2.0)

PPMProduct
Intergraph Smart Materials
PPMCategory_custom
Help

Name and Description

CommodityCodes - All commodity codes are returned

URL Format

https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/CommodityCodes

URL Parameter

:project, :discipline, :language

Data Parameter

None

Method

GET

Required Privilege

API_READONLY

Success Response

Response Metadata:

<EntityType Name="CommodityCodeDetail">

<Key>

<PropertyRef Name="CommodityId"/>

</Key>

<Property Name="CommodityId" Type="Edm.Int64" Nullable="false"/>

<Property Name="ProjId" Type="Edm.String"/>

<Property Name="CommodityCode" Type="Edm.String"/>

<Property Name="PartId" Type="Edm.Int64"/>

<Property Name="CommodityType" Type="Edm.String"/>

</EntityType>

Following HTTP status code is sent back to client on the Success of the API execution: 
Code: 200 OK

Content:

{

"@odata.context": "https://{host}/Smat/V1/$metadata#Projects('{project}')/Disciplines('{discipline}')/Nls('{nls}')/CommodityCodes",

"value": [

{

CommodityId: 924526,

ProjId: "PG",

CommodityCode: "154102DX75R8HNSV",

PartId: 5536,

CommodityType: "AB"

},

{

CommodityId: 924527,

ProjId: "PG",

CommodityCode: "154102DX75R8HYSN",

PartId: 5536,

CommodityType: "AB"

}]

}

Error Response

This API may fail with the following error messages: 
Error Code: 401 Unauthorized 
Content:

{

"error": {

"code": "",

"message": "Authorization has been denied for this request." }

}

Notes