Skip to content

Commit

Permalink
chore: improve sponsored brands examples
Browse files Browse the repository at this point in the history
PR: #133
  • Loading branch information
sanchesfer authored Dec 4, 2024
1 parent 36a3a82 commit 2357ff0
Showing 1 changed file with 71 additions and 10 deletions.
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:
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

0 comments on commit 2357ff0

Please sign in to comment.