SuitCRM API in batch manner

I want to create multiple documents for an existing account. I have id of existing account, what I am currently doing is:

  1. create each document though SuiteCRM API(module) and note id of new created document
  2. attach new created document to existing account through SuiteCRM relationship API(relationship)

If there are 3 documents, I have to call SuiteCRM api 6 times (3 for 1st step, 3 for 2nd step). Is there any better approach ? Much apprecate if anyone can share your suggestion. Thanks in advance :grinning:

If you prefer you can write a custom entry-point which handles you data the way you prefer, and which has access to the Beans objects to quickly check any validations you want, and to create beans and relationships.

This way you get full control of both sides of the integrations, so you can bundle data, zip it, encrypt it, do whatever you want.

If you want to stick to the API, you might try the new GraphQL API of SuiteCRM v8. I know it’s different, but I don’t much else about it, you’d have to explore.

Hi,

instead of entry point, you can extend the API and write your custom method (You can call all of these methods together and pass all the required payload in one API call), because entry point will not be accessible until you disabled the authentication for it (specially for this scenario).
if you go with API’s, it is better and secure although it may be little bit slow but we may not compromise over the security.

Thanks a lot.