Returns
Returns a TargetDeliveryResponse if called synchronously (default), or an AsyncResult if called with a callback. TargetDeliveryResponse has the following structure:
| Name | Type | Description |
|---|---|---|
| response | DeliveryResponse | Conforms to the Target Delivery API response |
| target_cookie | dict | Target cookie |
| target_location_hint_cookie | dict | Target location hint cookie |
| analytics_details | list[AnalyticsResponse] | Analytics payload, in case of client-side Analytics usage |
| trace | list[dict] | Aggregated trace data for all request mboxes/views |
| response_tokens | list[dict] | A list of Response Tokens |
| meta | dict | Additional decisioning metadata for use with on-device-decisioning |
Example
First, let’s build the Target Delivery API request for prefetching content for the home and product1 mboxes.
Python
A successful response will contain a Target Delivery API response object, which contains prefetched content for the requested mboxes. A sample target_response["response"] object (formatted as a dict) may appear as follows:
Python
Note the mbox name and state fields, as well as the eventToken field, in each of the Target content options. These should be provided in the send_notifications() request, as soon as each content option is displayed. Let’s suppose the product1 mbox has been displayed on a non-browser device. The notifications request will appear as follows:
Python
Notice we have included both the mbox state and the event token corresponding to the Target offer delivered in the prefetch response. Having built the notifications request, we can send it to Target via the send_notifications() API method:
Python
Was this content helpful?
Announcements
Get hands-on with agentic AI.
Explore how AI agents work together through real examples and hands-on practice. Join your local User Group to design an agent workflow with your peers and leave with a practical framework you can apply to your own work.
Find an eventAdobe Target Roadmap Webinar - Americas & EMEA
Preview the Adobe Target roadmap and ask the product team your questions live.
Adobe Target Roadmap Webinar - Americas & APAC
Preview the Adobe Target roadmap and ask the product team your questions live.