What is Profile-exports API in Banno Ads

33 views Asked by At

Endpoint - /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports

There is a POST and GET call to this endpoint.

Questions a) What is the purpose of this API b) Where is the CSV created by this API located ? Does it come back in the API response ? c) What are the columns in the CSV ? can you provide some samples ?

1

There are 1 answers

2
Sam On

The profile-exports creates an audience report for a campaign. The report will contain profile details for impressions and clickthrough data for the campaign.

As an example, you could expect something like this: Username, Identifier, First Name, Last Name, Email, Phone, Impression recorded (True/False), Clickthrough recorded (True/False)

POST /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports

This endpoint will initiate the request to create the report. A successful request will return something like this:

{
  "profileExportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "institutionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "campaignId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
...additional fields...
  "totalUsersCount": 23,
  "totalImpressionUsersCount": 23,
  "totalClickthroughUsersCount": 11
}

The important part of the response is the profileExportId which we will need for the next request.

GET /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports

Will return an array of all exports for the campaign. The response will look like this:

{
  "exports": [
    {
      "profileExportId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "institutionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "campaignId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
...additional fields...
      "createdAt": "string"
    }
  ]
}

The createdAt field will be a DateTime when the report CSV is created and ready for download via the csv endpoint. This value will be NULL until the report is ready.

Once the report is ready you can use the next endpoint to retrieve it.

GET /a/ads-reporting/api/v0/institutions/{institutionId}/campaigns/{campaignId}/profile-exports/{profileExportId}.csv

This endpoint will retrieve the generated report based on the profileExportId