Add Inventory Receipt Details - 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

Inventory Receipts – This API adds inventory items to the specified MRR.

URL Format

/Projects (':project')/Disciplines(':discipline')/Nls(':language')/ ReceivingHeaders({key})/Com.Ingr.Smat.V1.InvReceipts/

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

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_RECEIPTS

Data Parameter

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

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

<Parameter Name="bindingParameter" 

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

<Parameter Name="InvReceipt" 

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

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

</Action>

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

<ComplexType Name="InventoryReceipt">

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

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

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

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

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

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

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

<Property Name="RecvDate" Type="Edm.DateTimeOffset"/>

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

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

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

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

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

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

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

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

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

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

</ComplexType>

Where:

LocId (Edm.Decimal): Name (code) of the location defined in C.10.01 Site Locations. Use following Read Only API to list the bin locations.

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

WhId (Edm.Decimal): Warehouse Id is a mandatory value. Name (code) of the warehouse. Use following read api to show all accessible warehouses.

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

BnlId (Edm.Decimal): Name (CODE) of the bin location. bin location id is an optional value. Use following Read Only API to list the bin locations.

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

SmstId (Edm.Decimal Nullable="false"): Name (code) of the receiving status defined in screen C.10.06 Site Material Status. When inserting a new record the status will be filled automatically using project default ZC_STATUS. This default can be overwritten.

ItemShipId (Edm.Decimal): ITEM_SHIP_ID is required in case of MRR by PO. Use following Read Only APIs to know the ITEM_SHIPMENT_ID.

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

To get POH_ID: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls('English')/MaterialRecvRpts?$filter=MRR_ID eq 10000025147

To get POLI_ID: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/OrderLineItems?$filter=POH_ID eq 10000066495

To get ITEM_SHIP_ID: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/ItemShipments?$filter=POLI_ID eq 10000456172

Ident (Edm.Decimal): Ident is a required in case of MRR by Direct Receive.

Use following Read Only API to know the ident of the line items:

To get POH_ID: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(‘:language’)/MaterialRecvRpts

To get Ident: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/OrderLineItems

RecvQty (Edm.Decimal): Quantity received for this item shipment.

If the revision of the MRR is greater than 0.

You can only revise the quantity not yet reserved or issued.

And heat numbers have been issued (partially or complete) you cannot post MRRs without a heat number or the correct heat quantity (received in a lower revision).

You may use following Read API to know the expected quantity:

To Know Expected Quantity: https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/OrderLineItems

RecvDate (Edm.DateTimeOffset): Date of material receive. The date should be in the ‘YYYY-MM-DD’ format.

UnitId (Edm.Decimal): Code for the quantity unit.

TagNumber (Edm.String): Tag number of the item shipment.

HeatNumber (Edm.String): Code of the heat number.

You may use following Read Only API to know the heats available:

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

CertificateNumber (Edm.String): Certificate Number

The certificate number is only updateable if you have defined a new heat number.

Manufacturer (Edm.String): Manufacturer

The manufacturer is only updateable if you have defined a new heat number.

FileLocation (Edm.String): File Location

The file location is only updateable if you have defined a new heat number.

EsTagShortDesc (Edm.String): Specify TAG short description.

EsTagDescription (Edm.String): Specify TAG description.

ItyCode (Edm.String):

IrpId (Edm.Decimal):

Example 1, Use following JSON for MRR by Direct Receive:

{

"InvReceipt":{

"LocId ":6783,

"WhId": 5921,

"SmstId ":5681,

"Ident ":73354280,

"RecvQty ":500,

"RecvDate":'2016-05-24',

"UnitId ":502543,

"TagNumber ":'---',

"HeatNumber ":'330PLT11 S123 $ H1',

"CertificateNumber ":'CERTIFICATE 1',

"Manufacturer ":'hcci',

"FileLocation ":'',

"EsTagShortDesc ":'tag short description',

"EsTagDescription ":'tag description',

"ItyCode ":'SPOOL'

}

}

Example 2, Use following JSON for MRR by PO:

{

"InvReceipt":{

"LocId":6783,

"WhId": 5921,

"RecvQty":500,

"RecvDate":'2016-05-24',

"HeatNumber":'330PLT11 S123 $ H1',

"CertificateNumber":'CERTIFICATE 1',

"Manufacturer":'hcci',

"FileLocation":'',

"EsTagShortDesc":'tag short description',

"EsTagDescription":'tag descritpion',

"ItyCode":'SPOOL',

"SmstId":5681,

"ItemShipId":10000391352}

}

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": 10000114458

}

Error Response

This API may fail with the following error messages:

HTTP Status Code: 401 Unauthorized

Content:

{

"error": {

"code": "",

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

}

HTTP Status Code: 400 Bad Request

Content:

{

"error": {

"code": "",

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

}

HTTP Status Code: 400 Bad Request

Content:

{

"error": {

"code": "",

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

"innererror": {

"message": "SMST_ID : The SMST_ID field is required.\r\n",

"type": "",

"stacktrace": "" }

}

}

Notes