Delete Purchase Order Line Items

DELETE /api/.../purchaseorders/{id}/polineitems?ignorelinks=false

Delete one or more purchase order line items. Supports partial delete.

Request Information

Parameters
Name Type Required Description
id Integer Yes The unique id assigned to the purchase order.
ignorelinks Boolean No Defaults to false. If true, bypass checking if linked invoice line items exist or not.
Request Body

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

Property Type Nullable Description
POLineItemID Integer No PO line item identifier.
Example
application/json, text/json
[1, 998, 170994, 174090]

Response Information

Example
application/json, text/json
{
  "RecordsAffected": 1,
  "LinksExist": false,
  "Details": [
    {
      "Id": 1,
      "Deleted": false,
      "ErrorMessage": "Purchase Order Line Item with ID 1 not found."
    },
    {
      "Id": 998,
      "Deleted": false,
      "ErrorMessage": "Purchase Order Line Item with ID 998 not found."
    },
    {
      "Id": 170994,
      "Deleted": false,
      "ErrorMessage": "Purchase Order Line Item with ID 170994 not found."
    },
    {
      "Id": 174090,
      "Deleted": true,
      "ErrorMessage": null
    }
  ]
}
    

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_Modify (based on owner ID),
    CR_PurchaseOrders_Delete (based on owner ID),
    CR_PurchaseOrders_DeleteCancelledOrder (based on owner ID)