Updating Items in Transaction Scope
Updating Transaction-Scope Items (Order Center Items)

Update multiple items in the Order Center

The function's name is "update" since only items in the transaction scope (Order Center) can be updated, but in terms of the "cart" - items that does not yet exist in the cart will be updated, so it's a kind of "upsert" in terms of the cart.
Example:
1
pepperi.api.transactionScopeItems.update(
2
{ transaction:{UUID:"1af91512-81ef-4897-afb1-55d51f0a1948"},
3
objects:
4
[
5
{ item:{UUID: "c1e3fa63-6ca3-4ac2-82bf-c75a43ad138a"}, TSAHello:"hi"},
6
{ item:{UUID:"4a4bfe74-e948-46da-8a61-01be248e42c2"}, TSAHello:"bye"}
7
]
8
});
Copied!
Returns a response object with the list of updated items as following:
1
{
2
"success": true,
3
"result": [
4
{
5
"id": "c1e3fa63-6ca3-4ac2-82bf-c75a43ad138a",
6
"status": "updated",
7
"message": ""
8
},
9
{
10
"id": "4a4bfe74-e948-46da-8a61-01be248e42c2",
11
"status": "updated",
12
"message": ""
13
}
14
]
15
}
Copied!
Last modified 2yr ago
Copy link