Retrieving Transaction Lines
Retrieving Lines of a Transaction (lines in the Transaction's Cart)

Get single line by unique key

Line UUID is currently the only key supported
1
pepperi.api.transactionLines.get(
2
3
{ key: {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8"} ,
4
fields: [ "UnitsQuantity" , "Item.ExternalID"] } )
Copied!
Returns:
1
{success: true,
2
object:
3
{UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" ,
4
UnitsQuantity: 34 , Item.ExternalID: "ABCD123"
5
}}
Copied!

Search list of Transaction Lines by filter

Example:
1
pepperi.api.transactionLines.search({
2
fields: ["Transaction.UUID", "ExternalID", "MyTSA"],
3
filter: {
4
Operation: "AND", LeftNode: {
5
ApiName: "APIName1", Operation: ">",
6
Values: ["7"]
7
}, RightNode: {
8
ApiName: "ApiName2",
9
Operation: "InTheLast", Values: ["4", "Weeks"]
10
}
11
},
12
sorting: [{ Field: "MyTSA", Ascending: true }, { Field: "MyTSA2", Ascending: true }],
13
pageSize: 1000, page: 1
14
})
Copied!
Returns:
1
{success: true, objects:
2
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},
3
{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}
4
] }
Copied!

Search list of Transaction Lines by Transaction filter and Transaction Lines filter

The purpose of this function is to enable fetching transaction lines of transactions not loaded yet to memory.
1
pepperi.api.transactionLines.search ({
2
fields: [ "UUID", "ExternalID" , "MyTSA"] ,
3
transactionFilter : { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",
4
Values : ["7"]},RightNode:{ApiName: "ApiName2",
5
Operation: "InTheLast", Values: ["4","Weeks"]} }
6
filter: { Operation : "AND", LeftNode: {ApiName: "APIName1", Operation : ">",
7
Values : ["7"]},RightNode:{ApiName: "ApiName2",
8
Operation: "InTheLast", Values: ["4","Weeks"]} } ,
9
sorting : [{Field: "MyTSA",Ascending: true},{Field: "MyTSA2",Ascending: true }] } ,
10
pageSize : 1000 , page: 1})
Copied!
Returns:
1
{success: true, objects:
2
[ {UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78d8" , ExternalID: "abc123", MyTSA: 12.8},
3
{UUID: "aefb5346-74ac-4041-8bb1-a76a3b5e734h" , ExternalID: "abc456", MyTSA: 34.5}
4
] }
Copied!
Last modified 1yr ago