Undo Receipt Purchase Order Line Item Segments

PUT /api/.../polineitems/{id}/segments?action=undoreceipt

Undo receipt for one or more purchase order line item segments.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the purchase order line item.
action String Yes. Value should be 'undoreceipt' action identifier
Request Body

A JSON array of purchase order line item segment identifiers represented as numbers.

Property Type Nullable Description
POLineItemSegmentID Integer No POLI segment identifier.
Example
application/json, text/json
[
  208714,208715,208716
]

Response Information

Returns a result object with how many records were successfully affected (RecordsAffected), a success or failure message (Message) and list of JSON objects (Details)

Property Type Description
ID Integer PO line item identifier.
Succeeded Boolean Indicates if undo receipt is a success or not.
ErrorMessage String Description of error
ErrorCode Integer Error code
AdditionalInfo String Segment line number
Example
application/json, text/json
{
  "RecordsAffected": 2,
  "Message": "Undo receipt process succeeded for 2 item(s) and failed for 1 item(s).
There are holds on linked item records. These must be resolved prior to unreceipt of the selected item(s).", "Details": [ { "Id": 208714, "Succeeded": true, "ErrorMessage": null, "ErrorCode": 0, "AdditionalInfo": "1" }, { "Id": 208715, "Succeeded": true, "ErrorMessage": null, "ErrorCode": 0, "AdditionalInfo": "2" }, { "Id": 208716, "Succeeded": false, "ErrorMessage": "Undo receipt failed for line item 3. There are holds on linked item records.", "ErrorCode": 20045, "AdditionalInfo": "3" } ] }

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE.
  • Bad request
  • Invalid purchase order ID
  • Invalid poline item ID
404 FAILURE.
  • Purchase order not found
  • Purchase order line item not found

Required Permissions

Permission IDs found here.

    CR_AccessAcquisitions_Allow (),
    CR_PurchaseOrders_Access (based on owner ID),
    CR_PurchaseOrders_UndoReceipt ()