transactionScopeItems are items in the "order center" they are different in the way they are retrieved since they require transaction AND item keys
You can get specific item by UUID/ExternalID/InternalID
pepperi.api.transactionScopeItems.get({ transaction:{UUID:"<transaction UUID>"},item: {UUID:"<item UUID>"},// {ExtrenalID:""}/{"InternalID":123}fields:["Price", "Item.Name"] })
Returns:
{success: true,object:{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,Price: 123.4 , Item.Name: "Item AB Test1"}}
Supported from CPI 16 only!
To retrieve multiple objects use the search function for the desired resource - it returns the following object:
pepperi.api.transactionScopeItems.search ({transaction:{UUID:"<transaction UUID>"},fields: [ "UUID", "ItemExternalID" , "MyTSA"] ,filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",Values : ["7"]},RightNode:{ApiName: "ApiName2",Operation: "InTheLast", Values: ["4","Weeks"]} } ,sorting : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }] ,pageSize : 1000 , page: 1});
Returns:
{success: true, objects:[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ItemExternalID: "abc123", MyTSA: 12.8},{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ItemExternalID: "abc456", MyTSA: 34.5}] }