A record with email firstname.lastname@example.org has multiple records in the system. I have build a query to get contact ID for the record from the email -
/sap/opu/odata/SAP/API_MKT_CONTACT_SRV;v=3/AdditionalIDs?$filter=InteractionContactAdditionalOrigin eq'EMAIL' and InteractionContactAdditionalExternalID email@example.com' &$top=200
This gives a 202 result and gives output of different IDs like multiple IDs with Origin as SAP_C4C_BUPA, SAP_FORM, LANDING_PAGE -
A snapshot of the result -
This result is ok but I need output for specific Contact Origin of SAP_C4C_BUPA, so I added another filter -
/sap/opu/odata/SAP/API_MKT_CONTACT_SRV;v=3/AdditionalIDs?$filter=InteractionContactAdditionalOrigin eq'EMAIL' and InteractionContactAdditionalExternalID firstname.lastname@example.org' and ContactOrigin eq 'SAP_C4C_BUPA' &$top=200
Although this results in 202 message as well, but the result is empty and doesn't contain any data -
Can you let me know why addition of ContactOrigin eq 'SAP_C4C_BUPA' is showing no data in the result?
Is there any other way to get the desired result?
It is not possible to use ContactOrigin as filter together with either of InteractionContactAdditionalOrigin and InteractionContactAdditionalExternalID.
Maybe you can consider getting the response by using InteractionContactAdditionalOrigin and InteractionContactAdditionalExternalID, then gettj g the ContactID data for the response body object (with your costom code).
SAP Product Support