Uh oh!
There was an error while loading. Please reload this page.
feat: add external demand to sponsored listings auction - #199
Conversation
Uh oh!
There was an error while loading. Please reload this page.
jconnolly200
left a comment
There was a problem hiding this comment.
Looks good assuming it renders properly
Uh oh!
There was an error while loading. Please reload this page.
| $ref: "#/components/schemas/WinnerRank" | ||
| type: | ||
| $ref: "#/components/schemas/WinnerType" | ||
| enum: | ||
| - product |
There was a problem hiding this comment.
Bug: The ExternalDemandSponsoredListingsWinner schema incorrectly restricts the type field to product, preventing non-product Topsort winners (e.g., vendor, brand) from being returned in external demand auctions.
Severity: MEDIUM
Suggested Fix
Modify the type property within the ExternalDemandSponsoredListingsWinner schema to allow all valid winner types: ['product', 'vendor', 'brand', 'url']. This aligns it with the SponsoredListingsWinner schema and correctly reflects that Topsort-sourced winners in an external demand auction can be of any type, not just product.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: topsort-api-v2.yml#L1427-L1431
Potential issue: The `ExternalDemandSponsoredListingsWinner` schema restricts the `type`
field to an enum containing only `'product'`. However, in an external demand auction,
internal Topsort campaigns can compete, and these campaigns can be of type `'product'`,
`'vendor'`, `'brand'`, or `'url'`. While external demand sources are limited to product
bids, a Topsort campaign of a non-product type could still win the auction. If a
`'vendor'` or `'brand'` campaign wins, the API response would contain a `type` value
that violates the schema, potentially causing validation failures in client
applications.
Added external demand fields to auction request and new option for sponsored listings winners with external demand.
Doc: Demand Mediation API
The

demandSourcesrequest field is added to the sponsored listings request object. The response for sponsored listings with external demand is a new object/option: the schema is a bit different so I think it is better for it to be a stand alone object/optionBonus: Fix indentation for examples to show up.