Skip to main content

Hi all,

I’ve been running into some issues while trying to create a purchase receipt for a purchase order through the REST API.

I’m making a PUT request to /PurchaseReceipt in Postman with this body:

{
"VendorID": {
"value": "DER"
},
"LocationID": {
"value": "MAIN"
},
"Details": l
{
"InventoryID": {
"value": "10068777051226"
},
"Warehouse": {
"value": "NORR"
},
"Location": {
"value": "J01A"
},
"LotSerialNbr": {
"value": "1016"
},
"ExpirationDate": {
"value": "2025-05-01T00:00:00+00:00"
},
"POOrderType": {
"value": "Normal"
},
"POOrderNbr": {
"value": "PO000271"
},
"POOrderLineNbr": {
"value": 1
}
}
]
}

But I end up with a 422 and the following error message:

"error": "Inserting  'Purchase Receipt Line Split' record raised at least one error. Please review the errors.",


Further into the response block in the receipt line item, I get this:

"ExpirationDate": {
"error": "'Expiration Date' cannot be empty."
},


I can’t seem to make out the issue here, as the expiration date is clearly in the request body.

This issue does not occur if I try to create the receipt manually instead of through a REST request.

Additionally, this only seems to occur for purchase orders with certain inventory items, but not others. Making a near identical request with a different inventory item will successfully create the purchase receipt, so I’m thinking it must be something to do with the item itself, but I can’t figure out what that might be.

Any insights into this issue would be greatly appreciated!

@ElliotC I havn’t seen this error before.

I dont think ExpirationDate is a required field. Maybe try to make a call without it just to compare the outcome?


Hi @RohitRattan88, thanks for your reply.

I tried removing ExpirationDate from the request body, and unfortunately I get the same error message.


@ElliotC 

Not sure where the breakup is but I am able to generate PO Receipts with following info:

Postman
Receipt

Hopefully it helps


Reply