Skip to main content

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.

FieldDescription
partnerCampaignIdThe partner's identifier for the campaign
nameCampaign name
campaignTypeCampaign type (CampaignType enum — e.g. DISPLAY, SEARCH, SPONSORED_PRODUCTS)
dataSource.partner.idID of the channel the campaign ran on
dataSource.partner.nameName of the channel the campaign ran on
dataSource.partnerCompanyIdThe partner account the campaign belongs to
mappingsOne entry per brand the campaign is mapped to. Empty when the campaign is unmapped
mappings[].idInternal ID of the campaign for that brand
mappings[].company.idID of the mapped brand
mappings[].company.nameName of the mapped brand
pageInfo.totalCountTotal number of campaigns (standard pagination)
pageInfo.hasNextPageWhether 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
}
}
}
}
Variables
{
"organizationId": "<ORGANIZATION_ID>",
"page": {
"limit": 25
}
}

Response
{
"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
}
}
}
}
}