Add item in GRN
This REST API is used to add an item to a 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/addItem |
| 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",
"itemCode": "string",
"manufacturingDate": "2020-07-11T06:39:57.490Z"
}Request Payload Details
| LEVEL | PARAMETER | TYPE | DESCRIPTION | MANDATORY | NOTES |
|---|---|---|---|---|---|
| 1 | inflowReceiptCode | string | Receipt code | Yes | - |
| 2 | itemCode | string | Item code | Yes | Pattern: ^[a-zA-Z0-9-_]+$ |
| 3 | manufacturingDate | string | date-time | No | Eg.: 2020-07-11T06:39:57.490Z (UTC Format) |
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.639Z",
"status": "string",
"unitPrice": 0,
"maxRetailPrice": 0,
"additionalCost": 0,
"batchCode": "string",
"discount": 0,
"discountPercentage": 0,
"manufacturingDate": "2020-07-11T06:41:19.639Z",
"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 | - |
| 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.