Custom Objects - how to use API with a custom object type "Relationship"

Hi Folks,

Custom Objects are great! But I can´t find a way to create a Relationship item using the API. The example provided in the docunentarion refers to a master custom object:

I need to create a Relashionship linked to the contact AND to the Mater Custom Object. Can you please provide an example? @rcheesley have you ever faced this use case?

Best regards

We would love to know this too - we gave up after a few days…

1 Like

I do not think its possible at the moment (at least not using standard CO api endpoints).

I would suggest you look into how the link is made in CO plugin and then develop custom plugin with dedicated endpoint for it. At this point it seems the fastest way.

I did something similar in my situation.

I would however really appreciate this feature within CO plugin, so if/when its possible, please do not hesitate to share (Core Mautic Team).

@escopecz @fedy any insights that you can offer here?

The only API that works is the one linked at the top. We have a “v2” of API built on API Platform for Custom Objects but even that does not allow to create relationships. I know, it should, but so far no customer of ours needed it.

The API Platform will be pushed to the community GitHub repository at some point but since the lack of active testers and that open pull requests are sitting there for months and years it’s discouraging to push any more pull requests to the community. I’m ranting about this as I hop this will make more people active testers so the developers are not discouraged to push new features and bug fixes to the community repository. Right now it’s a waste of time.

1 Like

This is such a pity that you cannot create a relationship item yet.

As stated custom objects are amazing - super powerful and thanks to all that created it.

Is there any plans to continue developing the API and extending functionality ?

2 Likes

There is no plan to extend the API in the foreseeable future from our side. But I’ll gladly test and review any community contribution on this topic!