This API creates a Material Issue Report (MIR) header in Smart Materials.
Required Privilege: API_CREATE_MIRHEADER
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
URL Format: POST https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssuingHeaders
Specify values for the project, discipline, and language parameter in the URL. The project, discipline, and language together, define the project environment in which the MIR header is created.
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
MirNumber |
Name or code of the MIR |
String |
Required |
|
RevisionId |
Unique revision ID of the MIR |
Decimal |
Optional |
Default value is 0. |
FahId |
Unique ID of the Forecast header. |
Decimal |
Optional |
To view existing GET https://{host}/Smat/V1/Projects Consider only those FaHeaders |
MirCReateDate |
Date and time of the MIR creation |
Date Time Offset |
Optional |
In the absence of MirCreateDate, application |
IssueDate |
Date and time of the material issue |
Date Time Offset |
Optional |
In the absence of IsuueDate, application takes |
IssueBy |
Name of the user who has issued the MIR |
String |
Optional |
|
CompanyId |
Unique ID of the company |
Decimal |
Optional |
To view existing companies, use: GET https://{host}/Smat/V1/Projects |
WhId |
Unique ID of the warehouse |
Decimal |
Optional |
To view existing warehouses, use: GET https://{host}/Smat/V1/Projects(‘:project’) |
LocId |
Unique ID of the location |
Decimal |
Optional |
To view existing locations, use: GET https://{host}/Smat/V1/Projects( |
BnlId |
Unique ID of the bin location |
Decimal |
Optional |
To view existing bin locations, use: GET https://{host}/Smat/V1/Projects |
MirType |
Type of the MIR. Available options are:
|
String |
Optional |
Based on the MIR type, |
LnId |
Unique ID of the list node |
Decimal |
Optional |
To view existing list nodes, use: GET https://{host}/Smat/V1/Projects( |
PopllsByProc |
Allowed values are Y and N.
|
String |
Optional |
|
SiteStatInd |
Allowed values are Y and N.
|
String |
Optional |
Sample Code
POST https://{host}/Smat/V1/Projects Projects('AB')/Disciplines('PIPING')/Nls('English')/IssuingHeaders
{
"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
Status: 200 OK
{
"@odata.context": "@odata.context": " https://{host}/Smat/V1/$metadata#Edm.Int64",
"value": 10000010198
}
Where value is the unique ID of the Issuing Header (MirId).
After creating MIR header, NLS description can be added using NlsDescription.