This API updates an existing Material Issue Report header, it's description, and inventory issues in Smart Materials.
-
You can update only those MIRs that are of type MIR by BOM Commodity (B).
-
This API also supports adding inventory issues for Substitutions.
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: PUT https://{host}/Smat/V1/Projects(':project')/Disciplines(':discipline')/Nls(':language')/IssueReports({key})
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 get updated.
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
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 given MIR type is MIR by BOM Commodity. |
Integer64 |
Required |
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 |
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. |
If in case any inventory issue exists with same IviId and LpId combination, then its issue quantity also gets updated as per the passed parameters.
Sample Code
PUT http://localhost:63552/smat/v1/Projects('DEMO')/Disciplines('PIPING')/Nls('English')/IssueReports(5911)
{
"MirNumber": "KVPeerTest5",
"IssueDate": "2020-12-18T00:00:00+05:30",
"IssueBy": "kvemula",
"CompanyId": 5080,
"OverIssueWhId": 5212,
"LocId": 5002,
"MirType": "B",
"IssueType": "REGULAR",
"ShortDesc": "PeerTestingUpdate",
"Description": "PeerTestingUpdate",
"InvIssues": [
{
"LpId": 22301,
"IviId": 5842,
"IssueQty": 9,
"SubstInd":"N"
}
]
}
Success Response
Status: 200 OK
{
"@odata.context": "https://in-smatapisp.ingrnet.com/ServicePack/SMAT/V1/$metadata#Projects('DEMO')/Disciplines('PIPING')/Nls('English')/IssueReports/$entity",
"MirId": 5911,
"ProjId": "DEMO",
"DpId": 5020,
"MirNumber": "KVPEERTEST5",
"RevisionId": 0,
"MirCreateDate": "2020-12-18T17:50:32+05:30",
"PostedDate": null,
"IssueDate": "2020-12-18T00:00:00+05:30",
"IssueBy": "kvemula",
"CompanyId": 5080,
"OverIssueWhId": 5212,
"LocId": 5002,
"MirType": "B",
"IssueType": "REGULAR",
"DirectIssueType": null,
"CommodityId": null,
"Ident": null,
"BnlId": null,
"TagNumber": null,
"ScrapWhId": null,
"WorkOrder": null,
"SubstInd": "N",
"ShortDesc": "PeerTestingUpdate",
"Description": "PeerTestingUpdate"
}
Element |
Description |
Type |
---|---|---|
MirId |
Unique ID of the Material Issue Report |
Integer64 |
MirNumber |
Name (code) of the MIR. If MirNumber is not given by the user, it populates automatically based on the MIR number rule. |
String |
ProjId |
Unique ID of the Project. Updated MIR belongs to this project. |
String |
DpId |
Unique ID of the Discipline. Updated MIR belongs to this discipline. |
Integer64 |
RevisionId |
Unique revision ID of the MIR. Default value is 0. |
Integer16 |
MirCreateDate |
Date when the MIR was created |
Date Time Offset |
PostedDate |
Date when the MIR was posted in the inventory |
Date Time Offset |
DirectIssueType |
Refers to the issue type when the MIR type is D |
String |
CommodityId |
Unique ID of the commodity |
Integer64 |
Ident |
Ident number |
Integer64 |
TagNumber |
Tag number |
String |
WhId |
Unique ID of the warehouse |
Integer64 |