Skip to content

Usage

Public Client Layout

TargetClient is organized by explicit API namespaces instead of a flat list of loosely named methods.

The generated method-by-method wrapper reference lives in Methods Reference.

Core groups:

  • client.activities
  • client.audiences
  • client.properties
  • client.offers
  • client.reports
  • client.environments
  • client.mboxes
  • client.profile_attributes
  • client.batch

Activities

from adobe_target_admin import ActivitiesListParams

activities = client.activities.list(
    params=ActivitiesListParams(mbox="homepage-hero", viewId="hero-view"),
)
activity = client.activities.ab.get(activity_id)
created = client.activities.ab.create(payload)
updated = client.activities.xt.update(activity_id, payload)
description = client.activities.update_state(activity_id, payload)
changelog = client.activities.changelog(activity_id)

The ab and xt subgroups map directly to Adobe activity-type endpoints.

Return models:

  • activities.list() -> ActivityList
  • activities.ab.get/create/update/delete -> ABActivity
  • activities.xt.get/create/update/delete -> ABActivity
  • activities.update_name/update_state/update_priority/update_schedule -> ActivityDescription
  • activities.changelog(activity_id) -> ActivityChangelogList

Request models:

  • activities.list(params: ActivitiesListParams)
  • activities.ab.create/update(payload: ABActivity)
  • activities.xt.create/update(payload: ABActivity)
  • activities.update_name(payload: Name)
  • activities.update_state(payload: State)
  • activities.update_priority(payload: Priority)
  • activities.update_schedule(payload: Schedule)

Audiences

audiences = client.audiences.list()
audience = client.audiences.get(audience_id)
created = client.audiences.create(payload)
updated = client.audiences.update(audience_id, payload)
deleted = client.audiences.delete(audience_id)

Return models:

  • audiences.list() -> AudienceList
  • audiences.get/create/update/delete -> Audience

Request models:

  • audiences.list(params: AudiencesListParams)
  • audiences.create/update(payload: Audience)

AudiencesListParams exists for consistency with the typed query model pattern, but the current vendored OpenAPI spec does not define any documented audience list query fields.

Properties

properties = client.properties.list()
property_ = client.properties.get(property_id)

Return models:

  • properties.list() -> PropertyList
  • properties.get(property_id) -> Property

Offers

offers = client.offers.list()
offer = client.offers.content.get(offer_id)
created = client.offers.content.create(payload)
updated = client.offers.content.update(offer_id, payload)
deleted = client.offers.content.delete(offer_id)

offers.list() returns the mixed Adobe offer collection. Content-offer CRUD lives under offers.content because that is the implemented offer subtype today.

Return models:

  • offers.list() -> OfferList
  • offers.content.get/create/update/delete -> ContentOffer

Request models:

  • offers.content.create/update(payload: ContentOffer)

Reports

ab_performance = client.reports.ab.performance(activity_id)
ab_orders = client.reports.ab.orders(activity_id)
xt_performance = client.reports.xt.performance(activity_id)
abt_orders = client.reports.abt.orders(activity_id)

Report methods are grouped by activity type so the endpoint shape is visible from the call site.

Return models:

  • reports.ab.performance -> AbstractActivityPerformanceReport
  • reports.ab.orders -> ActivityOrdersReport
  • reports.xt.performance -> AbstractActivityPerformanceReport
  • reports.xt.orders -> ActivityOrdersReport
  • reports.abt.performance -> AbstractActivityPerformanceReport
  • reports.abt.orders -> ActivityOrdersReport

Other Namespaces

environments = client.environments.list()
mboxes = client.mboxes.list()
mbox = client.mboxes.parameters("homepage-hero")
attributes = client.profile_attributes.list()
batch_result = client.batch.execute(payload)

Return models:

  • environments.list() -> EnvironmentList
  • mboxes.list() -> MboxList
  • mboxes.parameters(mbox_name) -> Mbox
  • profile_attributes.list() -> MboxProfileAttributesDTO
  • batch.execute(payload) -> BatchResponse

Request models:

  • batch.execute(payload: BatchRequest)

Escape Hatches

When the convenience namespaces do not yet cover a documented endpoint:

  • use client.request(...) -> httpx.Response for raw transport access

The transport still applies Adobe's documented media-type versioning automatically.