Updating Standard resources
Last updated
Was this helpful?
Last updated
Was this helpful?
Was this helpful?
This guide outlines the process for updating standard resources using the Pepperi JS Client Side API. The update function allows modification of multiple objects by their unique keys, currently supporting only UUIDs.
Supported resources include accounts, transactions, activities, and transactionLines, with contacts added from CPI 15.85.
Description: Updates multiple objects in a specified resource using the update function, requiring UUIDs as the only supported key.
Supported Resources: accounts, transactions, activities, transactionLines (plus contacts from CPI 15.85)
Syntax:
pepperi.api.<resource>.update({
objects: [
{ UUID: "<UUID>", <field1>: <value1>, <field2>: <value2> },
{ UUID: "<UUID>", <field1>: <value1>, <field2>: <value2> }
]
});
Example:
pepperi.api.activities.update({
objects: [
{ UUID: "tgfb523e-74ac-4041-8bb1-a76a3b5e78f5", TSAMyComment: "ABC" },
{ UUID: "aefb523e-74ac-4041-8bb1-a76a3b5e78h6", TSAMyComment: "DEF" }
]
});
Returns:
{
"success": true,
"result": [
{ "id": "tgfb523e-74ac-4041-8bb1-a76a3b5e78f5", "message": "", "status": "updated" },
{ "id": "aefb523e-74ac-4041-8bb1-a76a3b5e78h6", "message": "", "status": "updated" }
]
}