Profiles¶
A profile is the brand/entity being promoted. Orders, campaigns, and articles all belong to a profile.
client.profiles # ProfilesResource
Methods overview¶
Method |
HTTP |
Scope |
|---|---|---|
|
|
|
|
|
|
|
|
|
|
|
list_team_profiles¶
List every profile on the given team. The team_id must match your token’s team (you can get it from client.auth.whoami().team_id).
def list_team_profiles(
team_id: str,
*,
limit: int = 25,
page: int = 1,
as_json: bool | None = None,
) -> Paginated[Profile] | dict
Returns a Paginated envelope of Profile.
Example
me = client.auth.whoami()
page = client.profiles.list_team_profiles(me.team_id)
for profile in page.records:
print(profile.name, profile.website_url)
list_orders¶
Orders scoped to one profile, with date filters.
def list_orders(
profile_id: str,
*,
start_date: str | None = None,
end_date: str | None = None,
paid_orders_only: bool | None = None,
limit: int = 25,
page: int = 1,
as_json: bool | None = None,
) -> Paginated[Order] | dict
Returns a Paginated envelope of Order.
start_date / end_date — ISO-8601 date strings (e.g. "2025-01-01" or full timestamps).
Example
page = client.profiles.list_orders(
"prof_1",
start_date="2025-01-01",
end_date="2025-06-30",
paid_orders_only=True,
)
list_order_items¶
Order items for a single profile. This endpoint returns a bare JSON array — not the paginated envelope.
def list_order_items(
profile_id: str,
*,
type: str | None = None,
is_add_on: bool | None = None,
search: str | None = None,
aggregate_add_ons: bool | None = None,
as_json: bool | None = None,
) -> list[ProfileOrderItem] | list[dict]
Returns a list of ProfileOrderItem — not the paginated envelope. See Pagination.
Example
items = client.profiles.list_order_items("prof_1", is_add_on=False)
for item in items:
print(item.name, item.outlet.name)
list_campaigns¶
def list_campaigns(
profile_id: str,
*,
limit: int = 25,
page: int = 1,
as_json: bool | None = None,
) -> Paginated[Campaign] | dict
Recipes¶
Dashboard per profile¶
me = client.auth.whoami()
profiles = client.profiles.list_team_profiles(me.team_id, limit=100)
for p in profiles.records:
orders = client.profiles.list_orders(p.id, paid_orders_only=True, limit=100)
camps = client.profiles.list_campaigns(p.id, limit=100)
print(f"{p.name}: {orders.total_records} orders, {camps.total_records} campaigns")
Add-ons only¶
addons = client.profiles.list_order_items("prof_1", is_add_on=True)