This API creates a Material Issue Report (MIR) header, description, and inventory issues in the Smart Materials.
-
This API supports MIR creation of only one type: MIR by BOM Commodity (B).
-
It also supports adding inventory issues for Substitutions.
-
MIR gets created only when the MIR header, it's description, and inventory issues are valid.
Required Privilege: API_MIR
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')/IssueReports
Specify the values for the project, discipline, and language parameter in the URL. The project, discipline, and language together, defines the project environment where the MIR details are created.
To view the assigned inventory issues to the given MIR, expand the InvIssues on issue reports API. Use this URL sample:
POST https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssueReports?$expand=InvIssues
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
MirNumber |
Name (code) of the MIR. If MirNumber is not given by the user, system provide a number based on the MIR number rule. |
String |
Optional |
Maximum allowed length is 50. |
MirCreateDate |
Date and time of the MIR creation |
Date Time Offset |
Optional |
Application takes the current date automatically |
IssueDate |
Date and time of the material issue |
Date Time Offset |
Required |
In the absence of IsuueDate, application takes |
Issueby |
Name of the user who has issued the MIR |
String |
Optional |
Maximum allowed length is 80. |
OverissueWhId |
Unique ID of the warehouse used for overissue.
|
Integer64 |
Optional |
To view existing the warehouses, use: GET https://{host}/Smat/V1/Projects(‘:project’) To view existing warehouses for user, use: GET https://{host}/Smat/V1/Projects(‘:project’)/ To view existing bin loc warehouses, use: GET https://{host}/Smat/V1/Projects(‘:project’)/ |
CompanyId |
Unique ID of the company. It is a required field if the given MIR type is MIR by BOM Commodity. |
Integer64 |
Required /Optional |
To view existing companies, use: GET https://{host}/Smat/V1/Projects |
LocId |
Unique ID of the location. If OverIssue quantity is given, then LocId is a mandatory field. |
Integer64 |
Optional |
To view existing locations, use: GET https://{host}/Smat/V1/Projects( |
BnlId |
Unique ID of the bin location. When project default ZC_BINLOC is set to BLOC, and over issue quantity is given, then BnlId is a mandatory field. |
Integer64 |
Optional |
To view existing bin locations, use: GET https://{host}/Smat/V1/Projects |
MirType |
Type of the MIR. Allowed option is:
|
String |
Optional |
|
IssueType |
Issue type of a MIR. Allowed issue type options depends on the type of MIR given.
|
String |
Required |
|
ScrapWhId |
Unique ID of the warehouse used for scrap |
Integer64 |
Optional |
|
WorkOrder |
Work Order / Agreement |
String |
Optional |
Maximum allowed length is 50. |
ShortDesc |
Short description of the MIR header given by the user |
String |
Optional |
Maximum allowed length is 20. |
Description |
Long description of the MIR header given by the user |
String |
Optional |
Maximum allowed length is 60. |
InvIssues |
Collection of InvIssues and its details |
Collection |
Required |
-
InvIssues
-
To add inventory issues for Substitutions, SubstInd value must be ‘Y’.
-
If there are any errors in the given InvIssues, MIR does not get created.
-
To know more about the valid inventory items for a ListPosition in a MIR, refer Get inventory items details.
-
Element |
Description |
Type |
Required |
Notes |
LpId |
Unique ID of the list position |
Decimal |
Required |
|
IviId |
Unique ID of the inventory item |
Decimal |
Required |
|
IssueQty |
Quantity of the issued material.
|
Decimal |
Required |
Maximum allowed length is 15 including three decimal values. |
IssueDate |
Issue date at the line item level |
Date Time Offset |
Optional |
|
SubstInd |
Indicates whether the ident is a substitute ident or not. Available values are Y and N. |
String |
Mandatory |
Default value is N. |
Sample Code
POST : https://{host}/Smat/V1/Projects Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports?$expand=InvIssues
{
"MirNumber": "Sample_MIR",
"IssueDate": "2021-01-21T14:26:00+05:30",
"IssueBy": "Prathyusha",
"CompanyId": 5360,
"OverIssueWhId": 5302,
"LocId": 5050,
"MirType": "B",
"IssueType": "REGULAR",
"ScrapWhId": null,
"WorkOrder": "Sample_WorkOrder",
"ShortDesc": "MIR_shortdesc",
"Description": "MIR_description",
"InvIssues": [
{
"LpId": 8460,
"IssueQty": 1,
"IviId": 7922,
"IssueDate": "2021-01-21T14:26:00+05:30"
"SubstInd":"Y"
},
{
"LpId": 8461,
"IssueQty": 1,
"IviId": 7926,
"SubstInd":"N",
"IssueDate": "2021-01-21T14:26:00+05:30"
}
]
}
Success Response
Status: 201 Created
{
"@odata.context": "http://localhost:53427/SMAT/V1/$metadata#Projects('SMAT')/Disciplines('PIPING')/Nls('English')/IssueReports/$entity",
"MirId": 5642,
"ProjId": "SMAT",
"DpId": 5020,
"MirNumber": "SAMPLE_MIR",
"RevisionId": 0,
"MirCreateDate": "2021-02-22T07:52:16+05:30",
"PostedDate": null,
"IssueDate": "2021-01-21T14:26:00+05:30",
"IssueBy": "Prathyusha",
"CompanyId": 5360,
"OverIssueWhId": 5302,
"LocId": 5050,
"MirType": "B",
"IssueType": "REGULAR",
"DirectIssueType": null,
"CommodityId": null,
"Ident": null,
"BnlId": null,
"TagNumber": null,
"ScrapWhId": null,
"WorkOrder": "Sample_WorkOrder",
"ShortDesc": "MIR_shortdesc",
"Description": "MIR_description",
"InvIssues@odata.context": "http://localhost:53427/SMAT/V1/$metadata#Projects('SMAT')/Disciplines('PIPING')/Nls('English')/IssueReports(5642)/InvIssues",
"InvIssues": [
{
"ProjId": "SMAT",
"DpId": 5020,
"IisId": 6165,
"IviId": 7926,
"MirId": 5642,
"IvprId": null,
"BomPath": "PB_BOM",
"LpId": 8461,
"LpPos": "2",
"IssueQty": 1,
"Ident": 42261264,
"ListPosQty": 100,
"ListPosIssueQty": 45,
"QtyChanged": "N",
"OverissueOrScrapQty": 0,
"OnHandQty": 160,
"DCIQty": 0,
"RevWithDC": "N",
"DCIOnHandQty": 0,
"LnId": 11160,
"IssueDate": "2021-01-21T14:26:00+05:30",
"WhId": 5300,
"LocId": 5050,
"SmstId": 5025,
"MLDProcessing": "NULL",
"MLDRegisterQty": 0,
"TotalOIQty": 0,
"OIOnHandQty": 0,
"SumIssueOrOverIssueQty": 0,
"UsedOIQty": 0,
"RevOverissueQty": 0,
"ExpOIQty": 0,
"RToIssQty": 55,
"UnitId": 5297,
"TagNumber": null,
"TotalRecvQty": 200,
"ListPosResvQty": 0,
"CommodityId": 118347,
"Size1": ".75",
"Size2": ".175",
"Size3": ".13",
"Size4": "0",
"Size5": "0",
"HeatId": null,
"ItemShipId": null,
"ResvQty": 1,
"SubstInd":"N",
"OriginalIdent": null
},
{
"ProjId": "SMAT",
"DpId": 5020,
"IisId": 6164,
"IviId": 7922,
"MirId": 5642,
"IvprId": null,
"BomPath": "PB_BOM",
"LpId": 8460,
"LpPos": "1",
"IssueQty": 1,
"Ident": 42261263,
"ListPosQty": 100,
"ListPosIssueQty": 45,
"QtyChanged": "N",
"OverissueOrScrapQty": 0,
"OnHandQty": 114,
"DCIQty": 0,
"RevWithDC": "N",
"DCIOnHandQty": 0,
"LnId": 11160,
"IssueDate": "2021-01-21T14:26:00+05:30",
"WhId": 5300,
"LocId": 5050,
"SmstId": 5025,
"MLDProcessing": "NULL",
"MLDRegisterQty": 0,
"TotalOIQty": 0,
"OIOnHandQty": 0,
"SumIssueOrOverIssueQty": 0,
"UsedOIQty": 0,
"RevOverissueQty": 0,
"ExpOIQty": 0,
"RToIssQty": 55,
"UnitId": 5297,
"TagNumber": null,
"TotalRecvQty": 200,
"ListPosResvQty": 0,
"CommodityId": 118347,
"Size1": ".5",
"Size2": ".175",
"Size3": ".13",
"Size4": "0",
"Size5": "0",
"HeatId": null,
"ItemShipId": null,
"ResvQty": 1,
"SubstInd":"Y",
"OriginalIdent": null
}
]
}
Element |
Description |
Type |
---|---|---|
MirId |
Unique ID of the created MIR |
Integer64 |
ProjId |
Unique ID of the project where the MIR gets created |
String |
DpId |
Unique ID of the discipline where the MIR gets created |
Integer64 |
PostedDate |
Date and time when the MIR is posted by the user |
Date Time Offset |
DirectIssueType |
Refers to the issue type when the MIR type is MIR by Direct Issue (D). |
String |
RevisionId |
Unique revision ID of the MIR. Default value is 0. |
Integer16 |
WhId |
Unique ID of the warehouse |
Integer64 |
CommodityId |
Unique ID of the commodity |
Integer64 |
Ident |
Ident |
Integer64 |
TagNumber |
Tag number |
String |