Return the destination audience id and a result summary in the sync run API
We use the Activations API to create and update ad audiences on LinkedIn, Meta, Google Ads and Microsoft Ads for our customers. For a new audience we map the audience name as a constant value, and the first sync run creates the audience on the destination.
After that first run we need the id of the new audience, but the API doesn't return it. Today we call refresh_objects after the run, wait until it completes, and then look for the audience by name in GET /api/v1/destinations/{id}/objects. This works, but it adds a refresh for each new audience, which means more API calls to the destination, and it depends on the audience name being unique.
Our suggestion is to add an object with the result on the destination to GET /api/v1/sync_runs/{id}, and the latest one to GET /api/v1/syncs/{id}. For example:
"destination_result": {
"audience_id": "123456789",
"audience_name": "UserGems Example Audience",
"destination_object": "user_segment",
"created_in_this_run": true,
"top_errors": [
{ "message": "Not assigned appropriate role on sponsoredAccount in ACP", "records": 250 }
]
}
The audience id is the most important part for us. For destinations where the upload API doesn't return the id (like the Microsoft Ads bulk upload), Census could look it up by name right after the run.
The error summary would also help a lot. In one case LinkedIn rejected all records because of a missing role, but the run status was completed and we could only find the reason in the API inspector. With it we could show our customers the real reason right away.
This would let us get the audience id right after the first run without extra refreshes, and react to errors much faster.
Please sign in to leave a comment.
Comments
0 comments