Create MIR 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

Issuing – This API creates a MIR header in Smart Materials.

URL Format

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

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

API_CREATE_MIRHEADER

Data Parameter

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

<EntityType Name="IssuingHeader">

<Key>

<PropertyRef Name="Key"/>

</Key>

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

</EntityType>

Where:

MirNumber (Edm.String): Material issue report number is created by a MIR rule (C.10.08), which is predefined and assigned to the user (C.10.21) currently logged on.

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

FahId (Edm.Decimal): This value is needed only for MIR by reservation. Forecast Header ID with which a forecast reservation is run. Use following Read Only API for knowing the FAH_IDs.

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

MirCreateDate (Edm.DateTimeOffset): Default date when the material was issued. 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".

IssueDate (Edm.DateTimeOffset): Date when the material was issued. 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".

IssueBy (Edm.String): Who has issued the material?

CompanyId (Edm.Decimal): Name (code) for the company. Use following API to see the list of companies:

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

WhId (Edm.Decimal): ID of the warehouse. Use following read api to show all accessible warehouses.

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

nLocWarehouses

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

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

MirType (Edm.String): Type of the material issue. Default value is ‘D’.

LnId (Edm.Decimal): List Node id.

PoplIssByProc (Edm.String): Allowed values are ‘N’/’Y’.

SiteStatInd (Edm.String): Allowed values are ‘N’/’Y’.

Example:

{

"MirNumber": "RW000004",

"RevisionId": 0,

"FahId": 5702,

"MirCreateDate": "2007-09-11T00:00:00+05:30",

"IssueDate": "2007-09-11T00:00:00+05:30",

"IssueBy": "#DoneRW",

"CompanyId": 5265,

"WhId": null,

"LocId": null,

"BnlId": null,

"MirType": "D",

"LnId" : null,

"PoplIssByProc":" ",

"SiteStatInd":null

}

Success Response

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

Code: 200 OK

Content:

{

"@odata.context": "@odata.context": "

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

"value": 10000010198

}

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

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