Create MTR Inventory - 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

Create MTR Inventory – This API adds inventory items to an existing MTR in Smart Materials.

URL Format

/Projects (':project')/Disciplines(':discipline')/Nls(':language')/ TransferHeaders(:key)/Com.Ingr.Smat.V1.MTRInventory/

Specify values for project, discipline, language and key parameters in the URL. The first three values together define a project environment in which the MTR header is created. The key parameter defines the MTR header id, for which the inventory item is added.

Use the following read-only APIs to get the available values for each parameter.

/Projects,

/projects(':project')/Disciplines,

/projects(':project')/Disciplines(':discipline')/nls

URL Parameter

:project, :discipline, :language, :key

Method

POST

Required Privilege

API_CREATE_INV_TRANSFER

Data Parameter

The payload of the request should be in JSON format with the following structure:

<Action Name="MTRInventory" IsBound="true">

<Parameter Name="bindingParameter"

Type="Com.Ingr.Smat.Core.V1.MaterialTransferHeader"/>

<Parameter Name="InvTransfer"

Type="Com.Ingr.Smat.Core.V1.InventoryTransfer"/>

<ReturnType Type="Edm.Int64" Nullable="false"/>

</Action>

Below is the JSON structure of Com.Ingr.Smat.Core.V1.InventoryTransfer type:

<ComplexType Name="InventoryTransfer">

<Property Name="Ident" Type="Edm.Decimal" Nullable="false"/>

<Property Name="WhId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="LocId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="BnlId" Type="Edm.Decimal"/>

<Property Name="SmstId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="UnitId" Type="Edm.Decimal" Nullable="false"/>

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

<Property Name="HeatId" Type="Edm.Decimal"/>

<Property Name="ItrQty" Type="Edm.Decimal"/>

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

<Property Name="TargetBnlId" Type="Edm.Decimal"/>

<Property Name="TargetWhId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="TargetLocId" Type="Edm.Decimal" Nullable="false"/>

<Property Name="TargetSmstId" Type="Edm.Decimal" Nullable="false"/>

</ComplexType>

Where:

Ident (Edm.Decimal and Not Nullable): Name (code) of the ident. Use following Read Only API to view Idents.

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

WhId (Edm.Decimal and Not Nullable): Name (code) of the warehouse. Use following Read Only API to view Warehouse IDs.

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

LocId (Edm.Decimal and Not Nullable): Name (code) of the location. Use following Read Only API to view location IDs.

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Locations

BnlId (Edm.Decimal): Bin location Id of the ident.

SmstId (Edm.Decimal and Not Nullable): Name (code) of the receiving status defined in screen C.10.06 Site Material Status. Use following Read Only API to view SMST IDs.

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/SiteMaterialStatus

UnitId (Edm.Decimal and Not Nullable): Name (code) of the unit. Use following Read Only API to view Unit IDs.

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Units

TagNumber (Edm.String): Tag number for the ident. The default value for TAG_NUMBER is ‘---‘. Use following Read Only API to view Tag Numbers.

HeatId (Edm.Decimal): Name (code) of the heat number. Use following Read Only API to view Heat IDs.

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Heats

ItrQty (Edm.Decimal): Transfer quantity.

ItrComment (Edm.String): Transfer comment.

TargetBnlId (Edm.Decimal): Bin location Id of the ident.

TargetWhId (Edm.Decimal and Not Nullable): Name (code) of the warehouse. Use following Read Only API to view Warehouse IDs.

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

TargetLocId (Edm.Decimal and Not Nullable): Name (code) of the location. Use following Read Only API to view location IDs

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/Locations

TargetSmstId (Edm.Decimal and Not Nullable): Name (code) of the receiving status defined in screen C.10.06 Site Material Status. Use following Read Only API to view SMST IDs.

https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/SiteMaterialStatus

Example:

{

"InvTransfer":{

"Ident ":73354280,

"WhId ": 5921,

"LocId ": 10000003877,

"SmstId ": 5681,

"UnitId ": 502543,

"TagNumber ":'243',

"TargetWhId ": 5923,

"TargetLocId ":10000003877,

"TargetSmstId ": 5681

}

}

Success Response

HTTP status code sent back to client on the API execution success: 
Code: 200 OK

Content:

{

"@odata.context": " https://{host}/Smat/V1/$metadata#Edm.Int64",

"value": 10000006737

}

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." }

}

Error Code: 400 Bad Request

Content:

{

"error": {

"code": "",

"message": "Invalid/Missing input JSON data. Please refer metadata" }

}

Error Code: 400 Bad Request

Content:

{

"error": {

"code": "",

"message": "The request is invalid.",

"innererror": {

"message": "IDENT : The IDENT field is required.\r\nWH_ID : The WH_ID field is required.\r\nLOC_ID : The LOC_ID field is required.\r\nSMST_ID : The SMST_ID field is required.\r\nUNIT_ID : The UNIT_ID field is required.\r\nTARGET_WH_ID : The TARGET_WH_ID field is required.\r\nTARGET_LOC_ID : The TARGET_LOC_ID field is required.\r\nTARGET_SMST_ID : The TARGET_SMST_ID field is required.\r\n",

"type": "",

"stacktrace": ""

}

}

}

Notes