Use Cases-Sponsored

Number of APIs: 7

  1. 2. Get the user's sponsored accounts (ad accounts) GET {{baseUrl}}/adAccounts?q=search&search=(status:(values:List(ACTIVE)),test:false)&fields=id,name,test,referenceInfo&count=10&start=0

  2. 4. Validate the user's organization role GET {{baseUrl}}/organizationAcls?q=roleAssignee&state=APPROVED

  3. 8. [PULL] Schedule periodic form response (lead) pulls GET {{baseUrl}}/leadFormResponses?q=owner&owner=(sponsoredAccount:urn%3Ali%3AsponsoredAccount%3A{{sponsoredaccount_id}})&leadType=(leadType:{{leadtype_sponsored}})&limitedToTestLeads=false&submittedAtTimeRange=(start:{{timerange_start}},end:{{timerange_end}})&fields=ownerInfo,associatedEntityInfo,leadMetadataInfo,owner,leadType,versionedLeadGenFormUrn,id,submittedAt,testLead,formResponse,form:(hiddenFields,creationLocale,name,id,content)&count=10&start=0

  4. 8. [PUSH] Subscribe for lead notification webhooks POST {{baseUrl}}/leadNotifications

  5. 9. [PUSH] Fetch full lead data after a lead notification is received GET {{baseUrl}}/leadFormResponses/{{lead_id}}?&fields=ownerInfo,associatedEntityInfo,leadMetadataInfo,owner,leadType,versionedLeadGenFormUrn,id,submittedAt,testLead,formResponse,form:(hiddenFields,creationLocale,name,id,content)

  6. [PUSH] Delete a registered webhook by id DELETE {{baseUrl}}/leadnotifications/<webhook id>

  7. 5. Get forms for the chosen Sponsored Account GET {{baseUrl}}/leadForms?q=owner&owner=(sponsoredAccount:urn%3Ali%3AsponsoredAccount%3A{{sponsoredaccount_id}})&count=10&start=0