From dacc6cade4fadc0b7aaf26eedd4a9364382702f2 Mon Sep 17 00:00:00 2001 From: Nico Kroll Date: Thu, 16 Oct 2025 09:25:45 +0200 Subject: [PATCH] Pair- or Couplesearch implementation For different dimensions of front and rear axle --- src/v2/shop.yaml | 419 ++++++++++++++++++++++++++++++----------------- 1 file changed, 267 insertions(+), 152 deletions(-) diff --git a/src/v2/shop.yaml b/src/v2/shop.yaml index 439861b..b11c754 100644 --- a/src/v2/shop.yaml +++ b/src/v2/shop.yaml @@ -1,7 +1,7 @@ openapi: 3.0.0 info: title: "TyrePro-API, Shop" - version: "Version 11" + version: "Version 12" servers: - url: "https://musterreifen.com/api/shop" description: "Development server, customers domain" @@ -66,6 +66,47 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] + /DeliveryTypes: + get: + tags: + - "General" + parameters: + - name: "GuidCart" + in: "query" + required: true + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "GuidBranch" + description: "Required for providing stock and price information." + in: "query" + required: true + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "GuidCalculationProfile" + description: "If provided, the prices will base on this profile." + in: "query" + required: false + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/DeliveryType" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] /MaterialTypes: get: tags: @@ -117,6 +158,47 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] + /PaymentTypes: + get: + tags: + - "General" + parameters: + - name: "GuidCart" + in: "query" + required: true + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "GuidBranch" + description: "Required for providing stock and price information." + in: "query" + required: true + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "GuidCalculationProfile" + description: "If provided, the prices will base on this profile." + in: "query" + required: false + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/PaymentType" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] /TopSoldArticles: get: tags: @@ -148,51 +230,6 @@ paths: security: - SessionScheme: [] # Settings - /Configs: - get: - tags: - - "Settings" - parameters: - - $ref: "#/components/parameters/GuidOnlineService" - - $ref: "#/components/parameters/BinaryObjectContentType" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - type: "array" - items: - $ref: "#/components/schemas/Config" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] - /Configs/{Guid}: - patch: - tags: - - "Settings" - parameters: - - $ref: "#/components/parameters/GuidPath" - - $ref: "#/components/parameters/_HashValue" - - $ref: "#/components/parameters/BinaryObjectContentType" - requestBody: - required: true - content: - application/json: - schema: - $ref: "#/components/schemas/Config" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - $ref: "#/components/schemas/Config" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] /Addresses: get: tags: @@ -267,6 +304,51 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] + /Configs: + get: + tags: + - "Settings" + parameters: + - $ref: "#/components/parameters/GuidOnlineService" + - $ref: "#/components/parameters/BinaryObjectContentType" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/Config" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] + /Configs/{Guid}: + patch: + tags: + - "Settings" + parameters: + - $ref: "#/components/parameters/GuidPath" + - $ref: "#/components/parameters/_HashValue" + - $ref: "#/components/parameters/BinaryObjectContentType" + requestBody: + required: true + content: + application/json: + schema: + $ref: "#/components/schemas/Config" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + $ref: "#/components/schemas/Config" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] /OfferArticles: get: tags: @@ -346,25 +428,6 @@ paths: security: - SessionScheme: [] # Menu - /Modules: - get: - tags: - - "Menu" - parameters: - - $ref: "#/components/parameters/GuidOnlineService" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - type: "array" - items: - $ref: "#/components/schemas/Module" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] /Downloads: get: tags: @@ -391,11 +454,10 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] -# Search - /FilterSuggestions: + /Modules: get: tags: - - "Search" + - "Menu" parameters: - $ref: "#/components/parameters/GuidOnlineService" responses: @@ -406,11 +468,12 @@ paths: schema: type: "array" items: - $ref: "#/components/schemas/FilterSuggestion" + $ref: "#/components/schemas/Module" default: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] +# Search /Filters: get: tags: @@ -472,6 +535,25 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] + /FilterSuggestions: + get: + tags: + - "Search" + parameters: + - $ref: "#/components/parameters/GuidOnlineService" + responses: + 200: + description: "successful operation" + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/FilterSuggestion" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] /ShopArticleConfigs: get: tags: @@ -573,6 +655,111 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] + /ShopArticlePairs: + get: + tags: + - "Search" + parameters: + - $ref: "#/components/parameters/GuidOnlineService" + - $ref: "#/components/parameters/SearchTerm" + - $ref: "#/components/parameters/GuidMaterialType" + - $ref: "#/components/parameters/GuidVehicleType" + - $ref: "#/components/parameters/GuidWidth" + - $ref: "#/components/parameters/GuidSection" + - $ref: "#/components/parameters/GuidDiameter" + - $ref: "#/components/parameters/GuidSpeedIndex" + - $ref: "#/components/parameters/GuidLoadIndex" + - $ref: "#/components/parameters/GuidHoleCount" + - $ref: "#/components/parameters/GuidHoleCircle" + - $ref: "#/components/parameters/GuidOffset" + - $ref: "#/components/parameters/GuidHubBoreHole" + - $ref: "#/components/parameters/GuidManufacturer" + - $ref: "#/components/parameters/BinaryObjectContentType" + - $ref: "#/components/parameters/GuidDeliveryType" + - name: "GuidBranch" + description: "Required for providing stock and price information." + in: "query" + required: true + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "GuidCalculationProfile" + description: "If provided, the prices will base on this profile." + in: "query" + required: false + schema: + type: "string" + default: null + example: "ebb89e89-8d25-809e-7814-c53b686ae164" + - name: "SearchTerm2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidWidth2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidSection2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidDiameter2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidSpeedIndex2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidLoadIndex2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidHoleCount2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidHoleCircle2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidOffset2" + in: "query" + required: false + schema: + type: "string" + - name: "GuidHubBoreHole2" + in: "query" + required: false + schema: + type: "string" + responses: + 200: + description: "successful operation" + headers: + Guid-Shop-Article-Config: + schema: + type: "string" + description: "The ShopArticleConfig which was used to build the response. With this unification the configuration is maybe not precise, but you can show the results in a unified form (columns). Currently it's a response header. In the future we will maybe change this as a field in a response object." + content: + application/json: + schema: + type: "array" + items: + $ref: "#/components/schemas/ShopArticlePair" + default: + $ref: "#/components/responses/GenericError" + security: + - SessionScheme: [] /ShopArticleStockDetails: get: tags: @@ -1101,88 +1288,6 @@ paths: $ref: "#/components/responses/GenericError" security: - SessionScheme: [] - /DeliveryTypes: - get: - tags: - - "Cart" - parameters: - - name: "GuidCart" - in: "query" - required: true - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - - name: "GuidBranch" - description: "Required for providing stock and price information." - in: "query" - required: true - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - - name: "GuidCalculationProfile" - description: "If provided, the prices will base on this profile." - in: "query" - required: false - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - type: "array" - items: - $ref: "#/components/schemas/DeliveryType" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] - /PaymentTypes: - get: - tags: - - "Cart" - parameters: - - name: "GuidCart" - in: "query" - required: true - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - - name: "GuidBranch" - description: "Required for providing stock and price information." - in: "query" - required: true - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - - name: "GuidCalculationProfile" - description: "If provided, the prices will base on this profile." - in: "query" - required: false - schema: - type: "string" - default: null - example: "ebb89e89-8d25-809e-7814-c53b686ae164" - responses: - 200: - description: "successful operation" - content: - application/json: - schema: - type: "array" - items: - $ref: "#/components/schemas/PaymentType" - default: - $ref: "#/components/responses/GenericError" - security: - - SessionScheme: [] components: schemas: GenericError: @@ -1559,6 +1664,16 @@ components: type: "boolean" Thumbnail: $ref: "#/components/schemas/DbBlob" + ShopArticlePair: + type: "object" + required: + - "FrontArticle" + - "RearArticle" + properties: + FrontArticle: + $ref: "#/components/schemas/ShopArticle" + RearArticle: + $ref: "#/components/schemas/ShopArticle" ShopArticleInformation: type: "object" required: @@ -2064,6 +2179,7 @@ components: default: null example: "ebb89e89-8d25-809e-7814-c53b686ae164" GuidDeliveryType: + name: "GuidDeliveryType" description: "For providing more accurate stock and price information." in: "query" required: false @@ -2199,7 +2315,6 @@ components: # MISSING # GET /Vehicles # GET /Tubes -# Päarchensuche