openapi: 3.0.0 info: title: 'Rosa Search API' version: '0.1' servers: - url: 'https://preprod.rosasearch.istest.pl' description: 'Preprod server' - url: 'https://qa.rosasearch.istest.pl' description: 'QA server' paths: '/api/search/history/conversion?shop={shopCodeName}': post: tags: - 'Search - History - Conversion' operationId: ad7a2282f5e3c82c451e54da35257d96 parameters: - name: shopCodeName in: path description: 'Nazwa kodowa sklepu' required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/FrontendCreateSearchHistoryConversionRequestDTO' example: type: product_card searchId: 019054d2-eec0-74e2-b821-cae38de12b5a sessionId: 019054d2-eec0-74e2-b821-cae38de12b5a phrase: test responses: '200': description: 'Zwraca kod 200 poprawnie dodano konwesję.' '/api/search/product?shop={shopCodeName}': post: tags: - 'Search - Product' operationId: b6fc1e138de41f4360d155864605c2f7 parameters: - name: shopCodeName in: path description: 'Nazwa kodowa sklepu' required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SearchApiProductSearchRequestDTO' example: filter: phrase: text id: 123 prices: priceFrom: 300 priceTo: 400 producerId: 018a07b0-d7fd-7505-bea0-c36b5ce1b0fa categoryId: '679' sort: sortBy: price sortOrder: desc limit: 25 page: 1 enableSynonym: false responses: '200': description: 'Zwraca dane ...' content: application/json: schema: properties: pagination: { $ref: '#/components/schemas/SearchApiPaginationDTO' } data: { type: array, items: { $ref: '#/components/schemas/SearchApiProductResponseDTO' } } metadata: { type: object } type: object '/api/suggestion/product?shop={shopCodeName}': post: tags: - 'Suggestion - Product' operationId: 40bd39da7e8dea84e70c29beaa699487 parameters: - name: shopCodeName in: path description: 'Nazwa kodowa sklepu' required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/SuggestionApiRequestDTO' example: phrase: xyz enableSynonym: false responses: '200': description: 'Zwraca wyniki wyszukiwania wraz z potencjalnymi podpowiedziami' content: application/json: schema: properties: response: { type: boolean } data: { properties: { results: { description: 'Wyniki wyszukiwania, zwraca 10 podpowiedzi produktów', type: array, items: { $ref: '#/components/schemas/SuggestionApiResponseDTO' } }, suggested: { description: 'Wartości, które potencjalnie mogą pomóc w wyszukiwaniu, maksymalnie do 5 podpowiedzi', type: array, items: { $ref: '#/components/schemas/SuggestionApiSuggestedDTO' } } }, type: object } type: object components: schemas: FrontendCreateSearchHistoryConversionRequestDTO: properties: type: $ref: '#/components/schemas/SearchHistoryConversionType' searchId: description: 'Wygenerowany id przez front.' type: string sessionId: description: 'Wygenerowany id przez front.' type: string phrase: description: 'Fraza do której się odnosi.' type: string payload: oneOf: - $ref: '#/components/schemas/FrontendCreateSearchHistoryConversionPayloadRequestDTO' nullable: true type: object FrontendCreateSearchHistoryConversionPayloadRequestDTO: properties: id: description: 'id produktu.' type: string nullable: true type: object SearchApiPaginationDTO: properties: pageSize: type: integer totalCount: type: integer currentPage: type: integer previousPage: type: integer nullable: true nextPage: type: integer nullable: true type: object SearchApiProductResponseDTO: properties: id: type: integer cmsId: type: string internalId: type: string nullable: true name: type: string ean: type: string nullable: true slug: type: string priceGross: type: integer priceGrossCurrency: type: string priceGrossOld: type: integer priceGrossOldCurrency: type: string producerName: type: string nullable: true distributorName: type: string nullable: true priceChangePercentage: type: integer nullable: true hasAvailableStockAmount: type: boolean isAvailable: type: boolean stockAmount: type: integer image: type: string nullable: true synonyms: type: array items: type: string categories: type: array items: type: string flags: type: array items: type: string quantityOrder: type: integer nullable: true quantitySold: type: integer nullable: true priority: type: integer nullable: true isPromoted: type: boolean nullable: true isNotDisplayCrossedPrice: type: boolean nullable: true lowestPriceValue: type: integer nullable: true lowestPriceCurrency: type: string nullable: true type: object SearchApiProductFilterDTO: properties: phrase: type: string nullable: true producerId: type: string nullable: true prices: oneOf: - $ref: '#/components/schemas/SearchApiProductPricesFieldDTO' nullable: true id: type: integer nullable: true categoryId: type: integer nullable: true type: object SearchApiProductPricesFieldDTO: properties: priceFrom: type: integer nullable: true priceTo: type: integer nullable: true type: object SearchApiProductSearchRequestDTO: properties: filter: nullable: true oneOf: - $ref: '#/components/schemas/SearchApiProductFilterDTO' sort: nullable: true oneOf: - $ref: '#/components/schemas/SearchApiProductSortDTO' limit: type: integer page: type: integer enableSynonym: type: boolean excludeFromTrafficTracking: type: boolean searchId: description: 'wygenerowany po stronie frontu searchId do historii' type: string nullable: true sessionId: description: 'wygenerowany po stronie frontu sessionId do historii' type: string nullable: true type: object SearchApiProductSortDTO: properties: sortBy: type: string enum: - accuracy - latest - price - name - popularity sortOrder: type: string enum: - desc - asc type: object SuggestionApiResponseDTO: properties: id: type: string name: $ref: '#/components/schemas/SuggestionApiFieldDTO' slug: type: string categoryName: type: array items: $ref: 'ref="#/components/schemas/SuggestionApiFieldDTO"' producerName: $ref: '#/components/schemas/SuggestionApiFieldDTO' distributorName: $ref: '#/components/schemas/SuggestionApiFieldDTO' generatedIdentifier: $ref: '#/components/schemas/SuggestionApiFieldDTO' priceGross: type: integer priceGrossCurrency: type: string priceGrossOld: type: integer priceGrossOldCurrency: type: string priceChangePercentage: type: integer nullable: true hasAvailableStockAmount: type: boolean isAvailable: type: boolean stockAmount: type: integer image: type: string nullable: true flags: type: array items: type: string isNotDisplayCrossedPrice: type: boolean nullable: true lowestPriceValue: type: integer nullable: true lowestPriceCurrency: type: string nullable: true type: object SuggestionApiFieldDTO: properties: text: type: string nullable: true html: type: string nullable: true type: object SuggestionApiRequestDTO: properties: phrase: description: 'Fraza wyszukiwania, zwraca wyniki głównie po nazwie' type: string enableSynonym: description: 'Czy powinno wyszukiwać po synonimach' type: boolean excludeFromTrafficTracking: type: boolean searchId: description: 'wygenerowany po stronie frontu searchId do historii' type: string nullable: true sessionId: description: 'wygenerowany po stronie frontu sessionId do historii' type: string nullable: true type: object SuggestionApiSuggestedDTO: properties: text: type: string type: object SearchHistoryConversionType: properties: PRODUCT_CARD: description: 'karta produktu' type: object enum: - product_card ADDING_TO_CART: description: 'dodanie do koszyka' type: object enum: - adding_to_cart ADDING_TO_FAVORITE: description: 'dodanie do ulubionych' type: object enum: - adding_to_favorite type: string enum: - PRODUCT_CARD - ADDING_TO_CART - ADDING_TO_FAVORITE securitySchemes: apiKey: type: apiKey name: X-AUTH-TOKEN in: header security: - apiKey: []