Through this API, you can add all the item shipments in the inventory receipts or only the selected ones to an existing MRR created through a purchase order/agreement in a project of Smart Materials.
-
You cannot add the inventory receipt details if:
-
the revision number for the given MRR is greater than 0.
-
the given MRR is already posted.
-
If you are adding any specific item shipment, ensure that it is not part of any other MRR which is already posted with expected quantity <= 0.
-
-
You can only add heat details using PUT/PATCH methods of inventory receipt details API.
Required Privilege: API_MRR
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
To add all the item shipments as inventory receipts:
URL Format: POST http://localhost:65116/smat/v1/Projects(‘:project')/Disciplines(‘:discipline')/Nls(':language’)/ReceivingReports(':key1')/PopulateInvReceipts
Specify the values for project, discipline, language, and key in the URL. The project, discipline, and language together, define the project environment. The key1 defines the MRR ID (MrrId).
To add specific item shipments as inventory receipts:
URL Format: POST http://localhost:65116/smat/v1/Projects(‘:project')/Disciplines(‘:discipline')/Nls(':language’)/ReceivingReports(':key1')/InventoryReceipts
To add inventory receipt details, you can either provide ItemShipId or a combination of Position, SubPosition, ItemShipPosition and ItemShipSubPosition in the body of the request.
Element |
Description |
Type |
Required |
Notes |
---|---|---|---|---|
ItemShipId |
Unique ID of the shipment that is the part of the purchase order. |
Integer |
Required/ Optional |
|
Position |
Sequence number that identifies the related line items of an order. |
Integer |
Required/ Optional |
|
SubPosition |
An additional sequence number that identifies the split line items of an order. |
Integer |
Required/ Optional |
|
ItemShipPosition |
Sequence number that identifies the related item shipments of an order line item. |
Integer |
Required/ Optional |
|
ItemShipSubPosition |
An additional sequence number that identifies the split item shipments of an order. |
Integer |
Required/ Optional |
Sample Code
POST http://localhost:58201/SMAT/V1/Projects('RS')/Disciplines('PIPING')/Nls('English')/ReceivingReports(10000117322)/InventoryReceipts
{
"Position": 1,
"SubPosition": 1 ,
"ItemShipPosition": 1,
"ItemShipSubPosition": 1
}
Success Response
Status : 200 OK
{
"@odata.context": "http://localhost:57101/SMAT/V1/$metadata#Collection(Com.Ingr.Smat.V1.InvReceipt)",
"value": [
{
"@odata.type": "#Com.Ingr.Smat.V1.InvReceipt",
"InvReceiptId": 10000342226,
"ProjId": "RS",
"DpId": 5020,
"MrrId": 10000117322,
"Position": 1,
"SubPosition": 1,
"ItemShipPosition": 1,
"ItemShipSubPosition": 1,
"TagNumber": "M-12 FEEDER",
"IdentCode": "I47690860",
"ItyId": 500019,
"ItemType": "TAG W MS",
"CommodityCode": "M-12 FEEDER",
"Size1": "0",
"Size2": "0",
"Size3": "0",
"Size4": "0",
"Size5": "0",
"ItemShipQty": 100,
"ExpectedQty": 100,
"ReceiveToDateQty": 0,
"UnitCode": "pcs",
"PlateNumber": null,
"XDim": 0,
"YDim": 0,
"ReceivedQty": 100,
"QuantityChanged": "N",
"SiteCode": null,
"WarehouseCode": "#VEPA",
"LocationCode": "001",
"ReceiptStatus": "OK",
"HeatNumber": null,
"CertificateNumber": null,
"Manufacturer": null,
"FileLocation": null,
"RecvDate": "2023-09-28T00:00:00+05:30",
"LocId": 10000018242,
"WhId": 10000023043,
"SmstId": 5162,
"Ident": 47690860,
"UnitId": 500711,
"HeatId": null,
"ItemShipId": 10000868824,
"BnlId": null,
"PlateId": null,
"IdentDeviation": null,
"ReadyToPost": "Y",
"PoliId": 10000791646,
"CommodityId": 4566651,
"QuarantineLocation": "N",
"TagsInInventory": "N",
"RecvHeatNumbers": "N"
"LastInvReceiptId":null
}
]
}
Element |
Description |
Type |
---|---|---|
InvReceiptId |
Unique ID of the inventory receipt |
Integer |
ProjId |
Unique ID of the project. |
String |
DpId |
Unique ID of the discipline.. |
Integer |
MrrId |
Unique ID of the Material Receiving Report (MRR). |
Integer |
TagNumber |
Tag number of the item shipment. |
String |
IdentCode |
Code of the ident placed on this line item. |
String |
ItyId |
Unique ID of the item type. |
Integer |
ItemType |
Name or code of the item type. |
String |
CommodityCode |
Commodity code. |
String |
Size(1-5) |
Size (Input 1-5)) of the ident on this item shipment. |
String |
ItemShipQty |
Order quantity of the item shipment. |
Decimal |
ExpectedQty |
Quantity still expected for this item shipment. This quantity is calculated as the quantity of the item shipment minus the quantities already received (posted and not posted) on other MRRs. |
Integer |
ReceivedToDateQty |
Quantity received till date and is calculated as (ItemShipQty-ExpectedQty). |
Integer |
UnitCode |
Code for the quantity unit. |
String |
PlateNumber |
Name or code of the plate. |
string |
XDim |
X dimension of the plate. |
Decimal |
YDim |
Y dimension of the plate. |
Decimal |
ReceivedQty |
Quantity received for this item shipment. |
Decimal |
QuantityChanged |
Refers to the quantity which is not equal to the last revision quantity. Available values are Y and N. |
String |
WarehouseCode |
Name of the warehouse. |
String |
LocationCode |
Name of the location. |
String |
SiteCode |
Name or code of the bin location. |
String |
ReceiptStatus |
Name or code of the material receiving status. |
String |
HeatNumber |
Name or code of the heat number. |
String |
CertificateNumber |
Certificate number of the item shipment. |
String |
Manufacturer |
Name or code of the manufacturer. |
String |
FileLocation |
Name or code of the file location. |
String |
RecvDate |
Date and time when the material was received. |
DateTimeOffset |
LocId |
Unique ID of the location. |
Integer |
SmstId |
Unique ID of the site material status. |
Integer |
WhId |
Unique ID of the warehouse. |
Integer |
Ident |
Ident number. |
Integer |
UnitId |
Unique ID of the unit. |
Integer |
HeatId |
Unique ID of the heat number. |
Integer |
ItemShipId |
Unique ID of the item shipment. |
Integer |
BnlId |
Unique ID of the bin location. |
Integer |
PlateId |
Unique ID of the plate. |
Integer |
IdentDeviation |
Refers whether an ident deviation has occurred for the inventory item, i.e., if the property that has been assigned to project default ZP_DEVATTR has been assigned to the requisition line item or not. |
String |
ReadyToPost |
Refers whether the inventory item is ready to post or not. Available values are Y and N. |
String |
PoliId |
Unique ID of the order line item. |
Integer |
CommodityId |
Unique ID of the commodity code. |
Integer |
QuarantineLocation |
Refers whether the material should be tested/inspected at a quarantine location or not. Available values are Y and N. |
String |
TagsInInventory |
Refers whether the tags are in the inventory or not. Available values are Y and N. |
String |
RecvHeatNumbers |
Refers whether the heat numbers are assigned to the inventory receipt item or not. Available values are Y and N. |
String |
LastInvReceiptId |
Unique ID of the inventory receipt of the previous version. |
Integer |