Change Purchase Order Line Item Segments

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

Change destination organization, collection and/or fund 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 'change' action identifier
DtoSegmentChangeData PO line segment change data Yes Define this parameter in the request body.
DtoSegmentChangeData
Property Type Nullable Description
POLineItemSegmentIDs Array of Integer No List of POLI segment identifiers to be changed.
DestinationOrgID Integer No Identifier of the new destination organization.
DestinationCollectionID Integer Yes Identifier of the new destination collection.
FundID Integer Yes Identifier of the new fund.
Example
application/json, text/json
{
  "POLineItemSegmentIDs": [7,395769],
  "DestinationOrgID": 123,
  "CollectionID": 456,
  "FundID": 789
}

Response Information

Returns a result object of DtoBulkResult with how many records are succeeded (RecordsAffected), a success or failure message (Message) and list of DtoBulkData objects (Details)

DtoBulkData
Property Type Description
ID Integer PO line item segment identifier.
Succeeded Boolean Indicates if the item is received successfully.
ErrorMessage String Description of error
ErrorCode Integer Error code
AdditionalInfo String Segment line number
Example
application/json, text/json
{
  "RecordsAffected": 2,
  "Message": "Some selected segments were successfully updated.",
  "Details": [
    {
      "ID": 7,
      "Succeeded": false,
      "ErrorMessage": "Segment Number 2 - No changes detected.",
      "ErrorCode": 1
    }
  ]
}

HTTP Response Codes

Code Description
200 OK. Success
400 FAILURE.
  • Bad request
  • Invalid purchase order ID
  • Invalid poline item ID
403 FAILURE.
  • Forbidden
  • Permission denied
  • One or more required permissions are missing
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_ChangeFundDestinationCollection (based on owner ID)