Deal parties queries

When managing deals with multiple parties involved, you can use queries to find all the buying or selling parties that have a deal with you. Each party is represented by their known agent ID (KAID) and separated by known agent type.

NOTE: If a party has never created a deal with you, or has removed all their deals with you, then their known agent is excluded from the response.

You can choose from two queries to retrieve a list of either buying parties, or selling parties.

TIP: To get a specific party by name or KAID, you can add a filter to your query.

Deal parties query examples

The following sections provide GraphQL examples that demonstrate how to query for party information. These queries support filters and return a list of all parties by known agent classification. For details, see FAQs.

IMPORTANT: To run these queries, you must have your account ID assigned during onboarding. For details, see Get started with the PDP API for selling parties.

Retrieve buying parties

The following buyingPartiesWithDeals query retrieves all buying parties that have a deal with you, such as an advertiser or agency.

query GetBuyingPartiesWithDealsExample {
  buyingPartiesWithDeals(
    input: { accountId: "ACCOUNT_ID_PLACEHOLDER" }
  ) {
    edges {
      node {
        ... on KnownAgent {
          id
          name
          isEnabled
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    totalCount
  }
}

Retrieve selling parties

The following sellingPartiesWithDeals query retrieves all selling parties that have a deal with you, such as an intermediary, seller, or publisher.

query GetSellingPartiesWithDealsExample {
  sellingPartiesWithDeals(
    input: { accountId: "ACCOUNT_ID_PLACEHOLDER" }
  ) {
    edges {
      node {
        ... on KnownAgent {
          id
          name
          isEnabled
        }
      }
      cursor
    }
    pageInfo {
      hasNextPage
      hasPreviousPage
      startCursor
      endCursor
    }
    totalCount
  }
}

Filter parties

To improve your queries, add basic filters that specify what kind of information you are looking for. To reduce the number of responses and query complexity, use the where parameter. The following table lists all filterable properties.

Field Data Type Description
id String enum Filter parties with a specific KAID.
name String Filter parties by name.
searchText String Filter parties by names that contain the search text or have KAIDs with an exact match.

FAQs

The following are commonly asked questions about the deal party.

What's the difference between a deal party and a deal participant?

The deal party is the primary party listed in the buyingParty or sellingParty field of the deal. A deal participant is anyone involved with the deal, which can include additional parties allowed to bid or access the deal.

Why isn't a party appearing in my query results?

The following are some reasons why a party might not appear in your query results:

TIP: Check with the queried party if you should have access to their known agent or deals.

How do I view the deals of a party?

To view the details of a specific deal you have with a party, query for the deals object with their KAID.For details, see Deal queries.