# Issue with Linking Custom Objects together via API

**URL:** <https://forum.mautic.org/t/issue-with-linking-custom-objects-together-via-api/31841>\
**Category:** Product Support\
**Tags:** mautic-4\
**Created:** [April 25, 2024, 10:06am UTC](https://forum.mautic.org/t/issue-with-linking-custom-objects-together-via-api/31841 "2024-04-25T10:06:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kafoalex](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/kafoalex/32/12681_2.png) [@kafoalex](https://forum.mautic.org/u/kafoalex)\
**Post date:** [April 25, 2024, 10:06am UTC](https://forum.mautic.org/t/issue-with-linking-custom-objects-together-via-api/31841/1 "2024-04-25T10:06:43Z")

</div>

**Your software**  
My Mautic version is:4.4.11  
My PHP version is:7.4  
My Database type and version is:10.3.39-MariaDB

**Your problem**  
My problem is: Issue with Linking Custom Objects together via API

These errors are showing in the log: No error log

Steps I have tried to fix the problem: This is the JSON structure of my code. it work only by linking the Contact with the custom object.  
{  
“email”: “{{1.billing.email}}”,  
“firstname”: “{{1.billing.first\_name}}”,  
“lasname”: “{{1.billing.last\_name}}”,  
“phone”: “{{1.billing.phone}}”,  
“last\_active”: “{{1.date\_created}}”,  
“tags”: “{{1.meta\_data.value}}”,  
“customObjects”: {  
“data”: [  
{  
“id”: 1,  
“alias”: “product”,  
“data”: [  
{  
“name”: “{{1.line\_items.name}}”,  
“attributes”: {  
“prix”: “{{1.line\_items.price}}”,  
“id”: “{{1.line\_items.id}}”  
}  
}  
]  
},  
{  
“id”: 2,  
“alias”: “sale”,  
“data”: [  
{  
“name”: “{{1.line\_items.name}}”,  
“montant-total”: “{{1.line\_items.total}}”,  
“quantite”: “{{1.line\_items.quantity}}”,  
“date-de-vente”: “{{1.date\_created}}”  
}  
]  
}  
],  
“relationships”: {  
“vente”: {  
“parent”: “product”,  
“alias”: “sale”,  
“data”: [  
{  
“name”: “{{2.line\_items.name}}”,  
“montant-total”: “{{2.line\_items.total}}”,  
“quantite”: “{{2.line\_items.quantity}}”,  
“date-de-vente”: “{{2.date\_created}}”  
}  
]  
}  
}  
}  
}
