The Attribution API is currently a beta feature. For early access, please reach out to support@heypoplar.com
The Attribution Report endpoint enables you to generate an Attribution Report for up to 6 months of data. The resulting report will be delivered in batches to a webhook URL of your choosing (see below).
This endpoint allows you to generate an attribution report from a specified reporting window that will be delivered through a webhook.
Request Body
{ start_date:"YYYY-MM-DD", end_date:"YYYY-MM-DD", status:"created", campaign_scope:"b01cdd5e-5b83-4345-826a-094c823f894b", campaign_name:"Campaign Name 1", response_webhooks: ["api.yourwebhook.com/attribution_report"]}
{ start_date:"YYYY-MM-DD", end_date:"YYYY-MM-DD", status:"processing", campaign_scope:"b01cdd5e-5b83-4345-826a-094c823f894b", campaign_name:"Campaign Name 1", response_webhooks: ["api.yourwebhook.com/attribution_report"]}
{ start_date:"YYYY-MM-DD", end_date:"YYYY-MM-DD", status:"resending_report", campaign_scope:"b01cdd5e-5b83-4345-826a-094c823f894b", campaign_name:"Campaign Name 1", response_webhooks: ["api.yourwebhook.com/attribution_report"]}
Webhook Setup
This page will only appear if the Attribution API has been enabled for your account
To setup your Attribution API webhook, navigate to Integrations > Attribution Report and click the button to create a new webhook. From here, enter a webhook destination URL of your choosing. To verify the webhook has been setup correctly, use the "Send Test" link and ensure that a 200 response is returned.
Webhook Payload
When the report has finished generating, it will be sent through the webhook that was previously setup.
Example Payload
This sample response shows one complete set of data for a "match." Payloads will hold up to 100 matches per batch. The keys found in attribution_data are the same keys used in Download Raw Matches on the transactions page https://app.heypoplar.com/transaction.
HTTP POST payloads contain an X-SLM-Signature HTTP header. This is the HMAC hex digest of the response body. It is generated using the SHA1 hash function with the secret displayed on Integrations > Attribution Report as the HMAC key. You can use this in order to verify the authenticity and integrity of a payload.
Here is an example of verifying authenticity and integrity of a request body using the Ruby library OpenSSL::HMAC.