Add item SKU in GRN
This REST API is used to add item details in GRN.
As this is all in one solution for all traceability like Item-SKU or ITEM traceability also for Batching so it is recommended to use this API instead of using API named as “Add item in GRN”.
Tip
It is recommended to check out Notes for the reader. You might find this helpful as it contains Guidelines for using API references and Terminologies used here.
Basic Information
NAME | DETAILS |
---|---|
Endpoint: | /services/rest/v1/purchase/inflowReceipt/addItemSKU |
Request Type: | POST |
Level: | Facility |
Scheme: | HTTPS |
Header (Content-Type): | application/json |
Header (Authorization): | bearer {access-token}, Eg.: bearer b30f3aea-7978-49bb-9ea7-33eddfc80afa |
Header (Facility): | facility code as in Uniware (refer FAQs) |
Request Payload
{
"inflowReceiptCode": "string",
"inflowReceiptItem": {
"quantity": 0,
"unitPrice": 0,
"additionalCost": 0,
"manufacturingDate": "2021-07-11T06:40:06.225Z",
"expiry": "2021-10-11T06:40:06.225Z",
"skuCode": "string",
"wsBatchDetail": {
"wsBatchGroupFieldValue" : {
"expiryDate":"2021-10-11T06:40:06.225Z",
"mfd":"2021-07-11T06:40:06.225Z",
"cost": 123,
"mrp" : 150,
"vendorCode": "string",
"vendorBatchNumber": "string"
}
},
"itemDTOs": [
{
"code": "string",
"itemDetails": "string"
}
]
}
}
Request Payload Details
LEVEL | PARAMETER | TYPE | DESCRIPTION | MANDATORY | NOTES |
---|---|---|---|---|---|
1 | inflowReceiptCode | string | Receipt code | Yes | - |
2 | inflowReceiptItem | object | Receipt item details | Yes | - |
2.1 | quantity | integer | Quantity | Yes | - |
2.2 | unitPrice | number | Unit price | No | - |
2.3 | additionalCost | number | Additional cost | No | - |
2.4 | manufacturingDate | string | date-time | No | Eg.: 2020-07-11T06:39:57.490Z (UTC Format) |
2.5 | expiry | string | date-time | No | Eg.: 2020-07-11T06:39:57.490Z (UTC Format) |
2.6 | skuCode | string | SKU code of the item on the marketplace | No | Eg: BDFloral3 |
2.7 | wsBatchDetail | object | Batch details | No | Eg-ALL,MFG_EXP, Mandatory for Batching only |
2.7.1 | wsBatchGroupFieldValue | object | Batch group fields value | No | Mandatory for Batching only |
2.7.1.1 | expiryDate | Date | Expiry date | No | Yes/No depends upon the Batch Group for that Sku |
2.7.1.2 | mfd | Date | Manufacturing date | No | Yes/No depends upon the Batch Group for that Sku |
2.7.1.3 | cost | number | Cost price | No | Yes/No depends upon the Batch Group for that Sku |
2.7.1.4 | mrp | number | Max. retail price | No | Yes/No depends upon the Batch Group for that Sku |
2.7.1.5 | vendorCode | string | Vendor code | No | Yes/No depends upon the Batch Group for that Sku |
2.7.1.6 | VendorBatchNumber | string | Vendor Batch number | No | Yes/No depends upon the Batch Group for that Sku |
2.8 | itemDTOs | list | Details of item | No | Mandatory for ITEM Traceability only |
2.8.1 | code | string | Item code | No | Mandatory for ITEM Traceability only |
2.8.2 | itemDetails | string | Details of item | No | Mandatory for ITEM Traceability only |
Response Payload
{
"successful": true,
"message": "string",
"errors": [
{
"code": 0,
"fieldName": "string",
"description": "string",
"message": "string",
"errorParams": {
"additionalProp1": {},
"additionalProp2": {},
"additionalProp3": {}
}
}
],
"warnings": [
{
"code": 0,
"message": "string",
"description": "string"
}
],
"inflowReceiptItemDTO": {
"id": 0,
"purchaseOrderItemId": 0,
"itemSKU": "string",
"itemTypeName": "string",
"itemTypeImageUrl": "string",
"itemTypePageUrl": "string",
"vendorSkuCode": "string",
"quantity": 0,
"itemsLabelled": true,
"pendingQuantity": 0,
"rejectedQuantity": 0,
"detailedQuantity": 0,
"rejectionComments": "string",
"expiry": "2020-07-11T06:41:19.644Z",
"status": "string",
"unitPrice": 0,
"maxRetailPrice": 0,
"additionalCost": 0,
"batchCode": "string",
"discount": 0,
"discountPercentage": 0,
"manufacturingDate": "2020-07-11T06:41:19.644Z",
"expirable": true,
"shelfLife": 0,
"grnExpiryTolerance": 0
}
}
Response Payload Details
LEVEL | PARAMETER | TYPE | DESCRIPTION | NOTES |
---|---|---|---|---|
1 | successful | true | Request success status | - |
2 | message | string | Response message | - |
3 | errors | list | List of errors (if any) | - |
3.1 | code | number | Error code | - |
3.2 | fieldName | string | Field with error | - |
3.3 | description | string | Error description | - |
3.4 | message | string | Error message | for different Inflow Receipt Code shows Invalid purchase order id |
3.5 | errorParams | object | Parameters with error | - |
3.5.1 | additionalProp1 | object | Parameter 1 with error | - |
3.5.2 | additionalProp2 | object | Parameter 2 with error | - |
3.5.3 | additionalProp3 | object | Parameter 3 with error | - |
4 | warnings | list | List of warnings (if any) | - |
4.1 | code | number | Warning code | - |
4.2 | message | string | Warning message | - |
4.3 | description | string | Warning description | - |
5 | inflowReceiptItemDTO | object | Receipt item details | - |
5.1 | id | integer | ID | - |
5.2 | purchaseOrderItemId | integer | Item ID | - |
5.3 | itemSKU | string | Item SKU | - |
5.4 | itemTypeName | string | Item type name | - |
5.5 | itemTypeImageUrl | string | Item type image URL | - |
5.6 | itemTypePageUrl | string | Item type page URL | - |
5.7 | vendorSkuCode | string | Vendor SKU code | - |
5.8 | quantity | integer | Quantity | - |
5.9 | itemsLabelled | boolean | true if items labelled | |
5.10 | pendingQuantity | integer | Pending quantity | - |
5.11 | rejectedQuantity | integer | Rejected quantity | - |
5.12 | detailedQuantity | integer | Detailed quantity | - |
5.13 | rejectionComments | string | Rejection comments | - |
5.14 | expiry | string | date-time | Eg.: 2020-07-11T06:39:57.490Z (UTC Format) |
5.15 | status | string | Status | |
5.16 | unitPrice | number | Unit price | - |
5.17 | maxRetailPrice | number | Max. retail price | - |
5.18 | additionalCost | number | Additional cost | - |
5.19 | batchCode | string | Inventory batch code | - |
5.20 | discount | number | Discount amount | - |
5.21 | discountPercentage | number | Discount percentage | - |
5.22 | manufacturingDate | string | date-time | Eg.: 2020-07-11T06:39:57.490Z (UTC Format) |
5.23 | expirable | boolean | true if expirable | - |
5.24 | shelfLife | integer | Duration for which item remains in good condition while storing | - |
5.25 | grnExpiryTolerance | integer | Expiry tolerance | - |
Error Codes
Refer Response Codes section to know about specific errors codes.