Campaign catalog
Read every campaign listing you have access to within your organization, along with the brands each listing is mapped to.
Uses getOrganization.campaignsAggregated, a standard paged query: pass page
to control the page size, read pageInfo to know when to stop (see
Pagination).
A campaign belongs to the partner that reports it, so partnerCampaignId is
unique per partner rather than per organization. A campaign can also map to more
than one brand — mappings carries one entry per brand, and is empty when the
campaign is unmapped.
Budget group and optimization status are per-brand, so
they are not on this organization-level query at all. Read or set either value
with the brand-scoped getCompany.campaigns query and the campaign mutations
described there.
| Field | Description |
|---|---|
partnerCampaignId | The partner's identifier for the campaign |
name | Campaign name |
campaignType | Campaign type (CampaignType enum — e.g. DISPLAY, SEARCH, SPONSORED_PRODUCTS) |
dataSource.partner.id | ID of the channel the campaign ran on |
dataSource.partner.name | Name of the channel the campaign ran on |
dataSource.partnerCompanyId | The partner account the campaign belongs to |
mappings | One entry per brand the campaign is mapped to. Empty when the campaign is unmapped |
mappings[].id | Internal ID of the campaign for that brand |
mappings[].company.id | ID of the mapped brand |
mappings[].company.name | Name of the mapped brand |
pageInfo.totalCount | Total number of campaigns (standard pagination) |
pageInfo.hasNextPage | Whether another page remains (standard pagination) |
query OrganizationCampaignCatalog($organizationId: ID!, $page: PaginationInput) {
getOrganization(id: $organizationId) {
id
campaignsAggregated(page: $page) {
items {
partnerCampaignId
name
campaignType
dataSource {
partner {
id
name
}
partnerCompanyId
}
mappings {
id
company {
id
name
}
}
}
pageInfo {
totalCount
hasNextPage
}
}
}
}
{
"organizationId": "<ORGANIZATION_ID>",
"page": {
"limit": 25
}
}
{
"data": {
"getOrganization": {
"id": "<ORGANIZATION_ID>",
"campaignsAggregated": {
"items": [
{
"partnerCampaignId": "99999999999",
"name": "Campaign Name",
"campaignType": "DISPLAY",
"dataSource": {
"partner": {
"id": "0071050e-4c43-41c4-8dbc-9b857c0242d8",
"name": "Amazon DSP (Managed Service)"
},
"partnerCompanyId": "99999999"
},
"mappings": [
{
"id": "uuid",
"company": {
"id": "uuid",
"name": "Brand"
}
}
]
}
],
"pageInfo": {
"totalCount": 100,
"hasNextPage": true
}
}
}
}
}