Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: improve sponsored brands examples #133

Merged
merged 2 commits into from
Dec 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 71 additions & 10 deletions topsort-api-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ paths:
$ref: '#/components/responses/BadRequest'
401:
$ref: '#/components/responses/UnauthorizedError'
/auctions/sponsored-brand:
/v2/auctions/sponsored-brand:
jbergstroem marked this conversation as resolved.
Show resolved Hide resolved
post:
tags:
- Auctions
Expand Down Expand Up @@ -693,18 +693,39 @@ components:
Exactly **one** of the following fields must be set:
* `products`
* `category`
required:
- winners
- placementId
- triggers
properties:
winners:
type: integer
format: int32
minimum: 1
description: Specifies the maximum number of auction winners that should be returned.
category:
$ref: '#/components/schemas/SingleCategory'
products:
$ref: '#/components/schemas/Products'
required:
- winners
placementId:
type: string
x-stoplight:
id: biqordtdbp58t
triggers:
type: object
x-stoplight:
id: ne5n2vzri6o92
properties:
category:
$ref: '#/components/schemas/SingleCategory'
products:
$ref: '#/components/schemas/Products'
x-examples:
Example 1:
auctions:
- winners: 2
placementId: some-placement
triggers:
products:
ids:
- '1'
- '8'

SponsoredBrandAuctionResult:
type: object
Expand All @@ -713,16 +734,56 @@ components:
type: array
items:
$ref: '#/components/schemas/SponsoredBrandWinner'
description: >
Array of winner objects in order from highest to lowest bid.
It will be empty if there were no qualifying bids or if there was an error.
description: |
Array of winner objects in order from highest to lowest bid. It will be empty if there were no qualifying bids or if there was an error.
error:
type: boolean
description: A boolean indicating whether this auction was resolved successfully.
example: false
required:
- winners
- error
x-examples:
Example 1:
results:
- winners:
- rank: 1
resolvedBidId: ChAGc-G66Wt7LKQEOcW8VBdIEhABjz_zDXx7db-ZYpxiwJ3DGhABjr4Lt_J0_a7Xv_uIfyOXIgUKATEQATDrrg8
productId: '1'
title: Brand Example Promo 1
assets:
- url: 'https://assets.hosted.topsort.com/5bcccb92e5eaaa73ce9fcc545e944865bf70e9b60e5a048979769282450343c4/example-banner-1.png'
role: image
contentType: image/png
contentLength: 33902
width: 920
height: 920
- url: 'https://assets.hosted.topsort.com/c27c9cd94badc90fb50827e144dfacb2f51a601560905b950f525cec725ea85f/example-logo-1.png'
role: logo
contentType: image/png
contentLength: 80648
width: 264
height: 264
campaignId: 018f3ff3-0d7c-7b75-bf99-629c62c09dc3
- rank: 2
resolvedBidId: ChAGc-G66Wt7LKQEOcW8VBdIEhABk0pue7N5wYmzE04uO_iOGhABjr4Lt_J0_a7Xv_uIfyOXIgUKATgQATDrrg8
productId: '8'
title: Brand Example Promo 2
assets:
- url: 'https://assets.hosted.topsort.com/c049a46d834ab071cdde63e401d4efcd554e1a124f05c4ba9b3743fed2d43c4b/example-banner-2.jpeg'
role: image
contentType: image/jpeg
contentLength: 4505
width: 403
height: 125
- url: 'https://assets.hosted.topsort.com/db41a8b8b22c5ed9091f9f154b552b6bc1d1dbeb85059190f1c3b202977938f1/example-logo-2.png'
role: logo
contentType: image/png
contentLength: 34747
width: 140
height: 160
campaignId: 01934a6e-7bb3-79c1-89b3-134e2e3bf88e
error: false

SponsoredBrandWinner:
type: object
Expand Down
Loading