Portfolio
The Portfolio family of queries will most likely be your most used ones. It contains fields to related portfolio resources like funnel steps, contents, and labels.
WARNING
Even when making authenticated requests, the team id is not inferred. You will need to specify the team id in the query to make the query working.
Get portfolio by ID
This is one of the most barebones queries you can make. It will directly return the portfolio with the specified ID. If the ID does not match up with a portfolio, you will receive an error response.
query Portfolio($teamId: Int!, $portfolioId: Int!) {
portfolioV2(teamId: $teamId, portfolioId: $portfolioId) {
teamId
portfolioId
title
start
end
funnelSteps {
funnelStepId
type
title
}
}
}Get portfolio contents
Portfolio contents are the marketing campaigns or ad sets from specific providers (channels) that have been added to the portfolio.
query PortfolioContents($teamId: Int!, $portfolioId: Int!) {
portfolioV2(teamId: $teamId, portfolioId: $portfolioId) {
portfolioParentContents(first: 5000) {
edges {
node {
portfolioContentId
content {
contentId
title
provider {
provider_id
name
description
logo
}
}
}
}
}
}
}Get portfolio labels
Labels are used to categorize and group contents within a portfolio.
query PortfolioLabels($teamId: Int!, $portfolioId: Int!) {
portfolioV2(teamId: $teamId, portfolioId: $portfolioId) {
labels {
labelId
name
}
}
}Get portfolio funnel steps
Funnel steps represent the stages in the customer journey tracked within the portfolio.
query PortfolioFunnelSteps($teamId: Int!, $portfolioId: Int!) {
portfolioV2(teamId: $teamId, portfolioId: $portfolioId) {
funnelSteps {
funnelStepId
title
type
}
}
}