Create MRR Header - 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

Receiving – This API creates an MRR header in Smart Materials.

URL Format

/Projects (':project')/Disciplines(':discipline')/Nls(':language')/ReceivingHeaders

Specify values for project, discipline, and language parameters in the URL. These three values together define a project environment in which the MRR header 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

Method

POST

Required Privilege

API_CREATE_MRRHEADER

Data Parameter

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

<EntityType Name="ReceivingHeader">

<Key>

<PropertyRef Name="Key"/>

</Key>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

</EntityType>

Where:

MrrNumber (Edm.String): It is an optional value. In the absence of this value, System created number by a predefined MRR rule (C.10.07). The acceptable value is a string of maximum 50 characters.

RevisionId (Edm.Decimal): Revision of the current MRR. Default value is 0.

MrrCreateDate (Edm.DateTimeOffset): Date when the MRR was created. It is an optional value. In the absence of this value, system will use system date. The acceptable value is a date in the format of "YYYY-MM-DD".

RecvType (Edm.String): Allowed values are 'T', 'A', 'C', 'P', 'F', 'O', 'S', 'V', 'W', 'I'.

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

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

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’)/BinLocations

SmstId (Edm.Decimal): 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.

SgId (Edm.Decimal): If you want to restrict the number of item shipments of an order to the material placed on a shipment group you can enter a shipment group here. When pressing button 'Populate Groups' only item shipments of this shipment group will be taken into account.

PohId (Edm.Decimal): ID of the purchase order (PO). You may use the following Web API to know the existing POs in the system:

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

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

RecvBy (Edm.String): Who has received the material?

Shipper (Edm.String): Company which has shipped this material.

ShipperRefNo (Edm.String): Reference number of the shipper.

PoplIshByProc (Edm.String):

Example:

{

"WhId":6661,

"LocId":6783,

"SmstId":5681,

"RecvType":"C",

"MrrCreateDate":"2016-05-23",

"MatlRecvDate":"2016-05-23",

"RecvBy":"Krishna 25th May",

"Shipper":"Krishna Shippers",

"ShipperRefNo":"Krishna-123-456"

}

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

}

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

}

Notes

After creating MRR Header, NLS description can be added using HeaderNls.