Skip to content
45 changes: 17 additions & 28 deletions topsort-api-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,44 +84,44 @@
- results
examples:
- results:
- winners:
- rank: 1
type: product
id: p_Mfk11
resolvedBidId: WyJiX01mazExIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTMyNjYtY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0==
campaignId: 82588593-85c5-47c0-b125-07e315b7f2b3
error: false

Check warning on line 93 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `0` property tag "resultType" must be string.
- winners:
- rank: 1
type: product
id: p_Mfk15
resolvedBidId: WyJiX01mazE1IiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=
campaignId: 4bcc6093-f367-4df2-aa1b-7c1674dd6441
- rank: 2
type: product
id: p_PJbnN
resolvedBidId: WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwibGlzdGluZ3MiLCJkZWZhdWx0IiwiIl0=
campaignId: a72e4e43-55b5-4d08-81bb-cbb57df59c72
error: false

Check warning on line 105 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `1` property tag "resultType" must be string.
- winners:
- rank: 1
type: product
id: p_PJbnN
resolvedBidId: WyJlX1BKYm5OIiwiMTJhNTU4MjgtOGVhZC00Mjk5LTgzMjctY2ViYjAwMmEwZmE4IiwiYmFubmVyQWRzIiwiZGVmYXVsdCIsIiJd
campaignId: 1156ef4e-0109-4190-ac97-4436c82358d2
asset:
- url: https://topsort.cdnprovider.com/lhs-banner-image-for-p_PJbnN-1x.png
content:
headingText:
"A banner for Topsort with a product image and a shop now button"
bannerText: "Topsort has the best tech!"
bannerTextColour: "48a94c"
heroImage: "https://assets.imageurl.io/s/85d2d333-eed5-44d7-b131-8851d59f0574"
heroImageAltText: "Topsort product image"
error: false

Check warning on line 121 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `2` property tag "resultType" must be string.
- results:
- winners: []
error: false

Check warning on line 124 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: `0` property tag "resultType" must be string.
"400":
$ref: "#/components/responses/BadRequest"
"401":
Expand Down Expand Up @@ -584,8 +584,8 @@
minLength: 1
minItems: 1
examples:
- c_men_clothing

Check warning on line 587 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- c_shoes

Check warning on line 588 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- type: object
title: Category Disjunctions
description: Multiple disjunctions of categories for the purpose of running an auction.
Expand All @@ -605,8 +605,8 @@
minItems: 1
maxItems: 5
examples:
- c_red

Check warning on line 608 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
- c_blue

Check warning on line 609 in topsort-api-v2.yml

View workflow job for this annotation

GitHub Actions / Redocly

no-invalid-schema-examples

Example value must conform to the schema: type must be array.
SingleCategory:
type: object
title: Single Category
Expand All @@ -631,7 +631,7 @@
items:
type: string
description: A category ID.
minimum: 1
minLength: 1
minItems: 1
Device:
type: string
Expand Down Expand Up @@ -833,6 +833,8 @@
oneOf:
- $ref: "#/components/schemas/SponsoredListingsAuction"
- $ref: "#/components/schemas/BannersAuction"
minItems: 1
maxItems: 5
RankingRequest:
type: object
description: |
Expand Down Expand Up @@ -1911,45 +1913,28 @@
EventsRequest:
type: object
additionalProperties: false
properties:
impressions:
minProperties: 1
anyOf:
- title: Impressions
type: array
items:
$ref: "#/components/schemas/Impression"
$ref: "#/components/schemas/Impression"
minItems: 0
maxItems: 50
clicks:
- title: Clicks
type: array
items:
$ref: "#/components/schemas/Click"
$ref: "#/components/schemas/Click"
minItems: 0
maxItems: 50
purchases:
- title: Purchases
type: array
items:
$ref: "#/components/schemas/Purchase"
$ref: "#/components/schemas/Purchase"
minItems: 0
maxItems: 50
pageviews:
- title: Page views
type: array
items:
$ref: "#/components/schemas/Pageview"
$ref: "#/components/schemas/Pageview"
minItems: 0
maxItems: 50
minProperties: 1
anyOf:
- properties:
impressions:
minItems: 1
- properties:
clicks:
minItems: 1
- properties:
purchases:
minItems: 1
- properties:
pageviews:
minItems: 1
examples:
- impressions:
- id: eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
Expand Down Expand Up @@ -2010,6 +1995,7 @@
deviceType: mobile
channel: onsite
Impression:
title: Impression
type: object
description: >
An impression means a promotable has become visible to the consumer. For promoted entities,
Expand Down Expand Up @@ -2069,6 +2055,7 @@
examples:
- onsite
Click:
title: Click
description: >
A click is sent to Topsort when the consumer has clicked on a promotable. For promoted
entities, include the `resolvedBidId` field from the `/v2/auctions` response. For unpromoted
Expand Down Expand Up @@ -2134,6 +2121,7 @@
examples:
- onsite
Purchase:
title: Purchase
description: >
A purchase is sent to Topsort once a marketplace customer places an order. These events are
used to measure the effectiveness of an ad campaign.
Expand Down Expand Up @@ -2218,6 +2206,7 @@
examples:
- eb874c98-bf4d-40a9-ae6d-fcf4cecb535c
Pageview:
title: Pageview
type: object
description: >
A page view represents the navigation of the user throughout the page. They are considered
Expand Down
Loading