@@ -243,6 +243,55 @@ paths:
243
243
$ref : ' #/components/responses/BadRequest'
244
244
401 :
245
245
$ref : ' #/components/responses/UnauthorizedError'
246
+ /v2/auctions/travel :
247
+ post :
248
+ tags :
249
+ - Auctions
250
+ summary : Create an auction for hotel related products
251
+ operationId : createTravelAuctions
252
+ requestBody :
253
+ description : |
254
+ The information describing what will be auctioned.
255
+ Topsort will run an auction for each batched auction request, for which products' bids will compete against each other.
256
+ content :
257
+ application/json :
258
+ schema :
259
+ type : object
260
+ properties :
261
+ auctions :
262
+ type : array
263
+ items :
264
+ $ref : ' #/components/schemas/TravelAuctionRequest'
265
+ minItems : 1
266
+ maxItems : 5
267
+ required :
268
+ - auctions
269
+ required : true
270
+ responses :
271
+ 201 :
272
+ description : >
273
+ The auction results.
274
+ The list of winners will contain at most `winners` entries per auction.
275
+ It may contain fewer or no entries at all if there aren't enough products with usable bids, that is,
276
+ a bid amount greater than the reserve price and belonging to a campaign with enough remaining budget.
277
+ Bids become unusable if campaign budget is exhausted, the bid is disqualified to preserve spend pacing, etc.
278
+ content :
279
+ application/json :
280
+ schema :
281
+ type : object
282
+ properties :
283
+ results :
284
+ type : array
285
+ items :
286
+ $ref : ' #/components/schemas/AuctionResult'
287
+ minItems : 1
288
+ maxItems : 5
289
+ required :
290
+ - results
291
+ 400 :
292
+ $ref : ' #/components/responses/BadRequest'
293
+ 401 :
294
+ $ref : ' #/components/responses/UnauthorizedError'
246
295
/v2/events :
247
296
post :
248
297
tags :
@@ -848,6 +897,93 @@ components:
848
897
format : uint32
849
898
description : The asset height in pixels.
850
899
900
+ TravelAuctionRequest :
901
+ type : object
902
+ description : |
903
+ Describes the intent of running a travel auction.
904
+ properties :
905
+ type :
906
+ type : string
907
+ enum :
908
+ - hotels
909
+ description : Discriminator for the type of travel auction.
910
+ slots :
911
+ type : integer
912
+ format : int32
913
+ description : Specifies the maximum number of auction winners that should be returned.
914
+ products :
915
+ type : array
916
+ items :
917
+ $ref : ' #/components/schemas/TravelProduct'
918
+ travelContext :
919
+ $ref : ' #/components/schemas/TravelContext'
920
+ x-examples :
921
+ Example 1 :
922
+ auctions :
923
+ - type : hotels
924
+ slots : 2
925
+ products :
926
+ - id : hotel-1
927
+ qualityScore : 0.7
928
+ - id : hotel-2
929
+ travelContext :
930
+ - travelStartDate : 2025-01-01
931
+
932
+ TravelProduct :
933
+ type : object
934
+ required :
935
+ - id
936
+ properties :
937
+ id :
938
+ type : string
939
+ description : An array of hotels IDs that should participate in the auction.
940
+ example : miami-hotel
941
+ qualityScore :
942
+ type : number
943
+ minimum : 0
944
+ maximum : 1
945
+ exclusiveMinimum : true
946
+ example : 0.75
947
+ format : double
948
+ description : |
949
+ If given, this value will be combined with our internal quality score to provide a score
950
+ that better represents the relevance of the participating products.
951
+ Values must be between 0 and 1.
952
+
953
+ TravelContext :
954
+ type : object
955
+ required :
956
+ - site
957
+ properties :
958
+ travelStartDate :
959
+ type : string
960
+ format : date
961
+ description : RFC3339 formatted date representing the travel start point.
962
+ example : ' 2009-01-01'
963
+ travelEndDate :
964
+ type : string
965
+ format : date
966
+ description : |
967
+ RFC3339 formatted date representing the travel end point. Must be greater than start date.
968
+ example : ' 2009-01-15'
969
+ site :
970
+ type : string
971
+ minLength : 1
972
+ maxLength : 64
973
+ description : Web site requesting the auction
974
+ example : travel.argentina.com
975
+ passengers :
976
+ type : integer
977
+ description : Number of passengers. Must not exceed 10.
978
+ example : 3
979
+ travelerType :
980
+ type : string
981
+ enum :
982
+ - family
983
+ - group
984
+ - solo
985
+ - couple
986
+
851
987
Error :
852
988
type : object
853
989
required :
0 commit comments