Adding Objects to Standard Resources
Supports the following resources : accounts, transactions, activities and contacts
Coming Soon (CPI V 16.0)
- 1.The account field of the references object is mandatory (except for the accounts resource) and it supports UUID and InternalID.
- 2.The type field is mandatory for transactions and activities, while for accounts and contacts the type field is not mandatory - and if not provided the object will be created with the default type.
- 3.The type object should contain either type id or type name (when both are given the ID takes affect)
- 4.For transactions,activities and accounts - originAccount(transaction and activity only) and catalog fields can be assigned to define this type of relation, in the following restrictions:
- 1.originAccount - supports InternalID and UUID.
- 2.catalog - supports InternalID, UUID, and catalog Name.
- 3.catalog - is mandatory for accounts, activities and transactions that have multiple catalogs.
- 5.In case of objects that has Workflows transitions - the object will be created in the "new" status, with the New>>{Next Transition Step} initialized.
Example:
pepperi.app.<resource name>.add({
type: { InternalID: 1234 , Name : "Sales Order"} ,
references: { account: { UUID: "" } }, // Optional: {originAccount: { UUID: "" } // Optional: {catalog: { UUID: "" }
object: {GrandTotal: 567.5 ,TSASubject:"This Object was created with the client api"}
})
Returns:
{
"success": true,
"id": "6e2803cd-b656-4d4f-8d21-f7cee7167350",
"status": "added",
"message": ""
}
Last modified 4yr ago