I'm following https://docs.espocrm.com/development/api/relationships/ and try the example to link Account with Opportunity without problem. Including Opportunity with Contact and Lead.
However I can't link Account with Contact (using python):
payload1 = {"id": "65ead2d200305d970",}
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
Got:
<Response [403]>
Traceback (most recent call last):
File "espotest.py", line 12, in <module>
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
File "/home/hendro/Downloads/espo_api_client.py", line 73, in request
raise EspoAPIError(f'Wrong request, status code is {response.status_code}, reason is {reason}')
espo_api_client.EspoAPIError: Wrong request, status code is 403, reason is Only manyMany, hasMany & hasChildren relations are allowed.
payload1 = [{"id": "65ead2d200305d970",}]
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
Got:
<Response [200]>
False
Appreciate for any hint..
However I can't link Account with Contact (using python):
payload1 = {"id": "65ead2d200305d970",}
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
Got:
<Response [403]>
Traceback (most recent call last):
File "espotest.py", line 12, in <module>
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
File "/home/hendro/Downloads/espo_api_client.py", line 73, in request
raise EspoAPIError(f'Wrong request, status code is {response.status_code}, reason is {reason}')
espo_api_client.EspoAPIError: Wrong request, status code is 403, reason is Only manyMany, hasMany & hasChildren relations are allowed.
payload1 = [{"id": "65ead2d200305d970",}]
print(client.request('POST', 'Contact/65eae820758e89231/account', payload1))
Got:
<Response [200]>
False
Appreciate for any hint..
Comment