From 2759e1b6172e76eac6ef6634b04cf6c27cfa1a94 Mon Sep 17 00:00:00 2001 From: jlanglois Date: Fri, 2 Jan 2026 10:56:01 -0300 Subject: [PATCH 1/4] feat: add promotions filter --- topsort-api-v2.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index cc4f86f..a531d47 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -783,6 +783,11 @@ components: Use product attributes to filter auction bids. This feature requires additional integration and configuration. properties: + type: + type: string + description: Filter type. The value has to be `attribute` for attribute filter. + enum: + - attribute operator: type: string description: Filter operator type. The value can be `and` (has all) or `or` (has any). @@ -802,6 +807,35 @@ components: - color:red - material:leather - size:32 + PromotionsFilter: + type: object + title: PromotionsFilter + description: > + Use promotions to filter auction bids. This feature requires additional integration + and configuration. + properties: + type: + type: string + description: Filter type. The value has to be `promotion` for promotion filter. + enum: + - promotion + operator: + type: string + description: Filter operator type. The value can be `and` (has all) or `or` (has any). + enum: + - and + - or + promotions: + type: array + description: > + Promotions used for filtering. The promotion name is limited to 40 characters. + maxItems: 3 + items: + type: string + maxLength: 40 + examples: + - half-off + - offers occurredAt: type: string format: date-time @@ -986,6 +1020,8 @@ components: $ref: "#/components/schemas/PlacementId" page: $ref: "#/components/schemas/Page" + filter: + $ref: "#/components/schemas/PromotionsFilter" required: - type - slots From 31187953e2c5959ba15f188dc579da33fc498399 Mon Sep 17 00:00:00 2001 From: jlanglois Date: Fri, 2 Jan 2026 11:06:31 -0300 Subject: [PATCH 2/4] feat: update promotions filter to single promotion --- topsort-api-v2.yml | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index a531d47..d1d12c7 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -819,23 +819,13 @@ components: description: Filter type. The value has to be `promotion` for promotion filter. enum: - promotion - operator: + promotion: type: string - description: Filter operator type. The value can be `and` (has all) or `or` (has any). - enum: - - and - - or - promotions: - type: array description: > - Promotions used for filtering. The promotion name is limited to 40 characters. - maxItems: 3 - items: - type: string - maxLength: 40 - examples: - - half-off - - offers + Promotion used for filtering. The promotion name is limited to 40 characters. + examples: + - half-off + - offers occurredAt: type: string format: date-time From a8e2113db033a68d25327c6284053a3aa2f860e3 Mon Sep 17 00:00:00 2001 From: jlanglois Date: Fri, 2 Jan 2026 11:08:36 -0300 Subject: [PATCH 3/4] chore: linter --- topsort-api-v2.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index d1d12c7..3d09949 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -811,8 +811,8 @@ components: type: object title: PromotionsFilter description: > - Use promotions to filter auction bids. This feature requires additional integration - and configuration. + Use promotions to filter auction bids. This feature requires additional integration and + configuration. properties: type: type: string From e24c531ec2a95211ec6f8a39ed6d08e8a522ca8d Mon Sep 17 00:00:00 2001 From: jlanglois Date: Tue, 6 Jan 2026 10:15:58 -0300 Subject: [PATCH 4/4] chore: update promotions filter schema --- topsort-api-v2.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/topsort-api-v2.yml b/topsort-api-v2.yml index 3d09949..aa11ce8 100644 --- a/topsort-api-v2.yml +++ b/topsort-api-v2.yml @@ -819,13 +819,23 @@ components: description: Filter type. The value has to be `promotion` for promotion filter. enum: - promotion - promotion: + operator: type: string + description: Filter operator type. The value can be `and` (has all) or `or` (has any). + enum: + - and + - or + promotions: + type: array description: > - Promotion used for filtering. The promotion name is limited to 40 characters. - examples: - - half-off - - offers + Promotions used for filtering. The promotion name is limited to 40 characters. + maxItems: 3 + items: + type: string + maxLength: 40 + examples: + - half-off + - offers occurredAt: type: string format: date-time