Here's the (abbreviated) results of getting the metadata information for Contacts based on the article. Note the "Trusted" field we added to contacts is shown.
GET {{api-domain}}/crm/v2/settings/related_lists?module=Contacts
{
"related_lists": [
<REMOVED>
{
"sequence_number": "35",
"display_label": "Trusted",
"api_name": "Trusted",
"module": "Contacts",
"name": "Trusted",
"action": null,
"id": "5027237000000392183",
"href": "Contacts/{ENTITYID}/Trusted",
"type": "custom_lookup"
},
<REMOVED>
]
}
I created a test contact and added some trusted contacts to that via the web UI, and I can retrieve that with no issues as shown in the article via GET {{api-domain}}/crm/v2/Contacts/5027237000001319012/Trusted where 5027237000001319012 is the ID of the test record in my sandbox.
Now, when I attempt to add another trusted contact (5027237000002017001) to my test contact (5027237000001319012) via the REST API, I use the following call:
PUT {{api-domain}}/crm/v2/Contacts/5027237000001319012/Trusted/5027237000002017001
Body = {
"data": [
{}
]
}
However, I get a 400 bad request HTTP status code with the following body:
{
"code": "INVALID_DATA",
"details": {},
"message": "the module name given seems to be invalid",
"status": "error"
}
What am I doing wrong?