M.Gu
M.Gu

Reputation: 13

Facebook Lead Ads, Marketing API - Retrieve Business Profile from Lead Id

I create a webhook that send the lead to our CRM. Everything works fine: I can retrieve the lead, the form and the page data. Now I need to retrieve which business account create the ads for the leads. The ADS are managed by two different agencies and I need to understand each campaign origin.

I think is something that I can retrieve from the form_id but I don't know how. Could someone help me out on this one? Thank you

Upvotes: 0

Views: 139

Answers (1)

Vaibhav K. Patil
Vaibhav K. Patil

Reputation: 67

You can call the /me?fields=adaccounts - API first.

You will get the list of adccounts associated with the account in the response.

Then you can loop through the adaccounts(or you can pluck only the desired adaccounts) and then call the API to get the campaigns of each adaccount.

This way you will get leads as well as the adaccounts from which they are coming.

Upvotes: 0

Related Questions