Hi everyone!
I’m trying to get the email addresses associated with a specific Account, using the new JSON v8 API.
I can get my access token and use it to fetch the Account, now I’d like to get its email addresses too (I know that this particular account has two email addresses).
I’ve tried calling the
api/v8/modules/Accounts/{ACCOUNTID}/relationships/email_addresses
endpoint, here’s the data I’m receiving back:
[{'id': '1ee15ac7-18d3-96d7-035d-5b3f3c3dba94',
'links': {'href': 'http://devcrm/api/v8/modules/Accounts/1ee15ac7-18d3-96d7-035d-5b3f3c3dba94'},
'meta': {'middle_table': {'data': {'attributes': {'bean_id': 'a5ec312f-b1dc-d401-d3be-5b23b3058722',
'bean_module': 'Accounts',
'date_created': '2018-07-06 09:53:48',
'date_modified': '2018-07-06 09:53:48',
'deleted': '0',
'email_address_id': '1ee15ac7-18d3-96d7-035d-5b3f3c3dba94',
'id': '1ee15ac7-18d3-96d7-035d-5b3f3c3dba94',
'primary_address': '0',
'reply_to_address': '0'},
'id': '',
'type': 'Link'}}},
'type': 'EmailAddresses'},
{'id': '8f42881c-d788-9a69-15b3-5b3f3be9705f',
'links': {'href': 'http://devcrm/api/v8/modules/Accounts/8f42881c-d788-9a69-15b3-5b3f3be9705f'},
'meta': {'middle_table': {'data': {'attributes': {'bean_id': 'a5ec312f-b1dc-d401-d3be-5b23b3058722',
'bean_module': 'Accounts',
'date_created': '2018-07-06 09:49:13',
'date_modified': '2018-07-06 09:49:13',
'deleted': '0',
'email_address_id': '8f42881c-d788-9a69-15b3-5b3f3be9705f',
'id': '8f42881c-d788-9a69-15b3-5b3f3be9705f',
'primary_address': '0',
'reply_to_address': '0'},
'id': '',
'type': 'Link'}}},
'type': 'EmailAddresses'}]
As you can see, there are two “branches”, one for each email address, but the REAL addresses (x@y.com) are nowhere to be seen, only the "email_address_id"s. Is this normal? Should I use the "email_address_id"s to make another call to the server? I’m not sure how I should do that though.
Many thanks for your time!