openapi: 3.0.3
info:
  title: api-product-recommendations-lat
  version: 1.1.0
  description: Product recommendations for lord and taylor mobile. To be consumed
    by Skava
servers:
- url: https://m.lordandtaylor.com/api-product-suggestions
paths:
  /similarProductRecommendations/{context}/{productId}:
    get:
      description: Gets similar products recommendations inferring the org from the
        domain referrer
      parameters:
      - name: context
        in: path
        description: 'Context in which to show similar products, eg: PDP'
        required: true
        schema:
          $ref: '#/components/schemas/ComHbcApiProductRecommendationsLatV1EnumsSimilarProductContext'
      - name: productId
        in: path
        description: Product code for which we want to return similar products
        required: true
        schema:
          type: string
      - name: color
        in: query
        description: plain text color
        required: false
        schema:
          type: string
        example: grey
      - name: limit
        in: query
        description: Limit on number of recommendations to be returned
        required: true
        schema:
          type: integer
          format: int32
      - name: Referer
        in: header
        description: The service will use the content of this header to infer the
          org
        required: true
        schema:
          type: string
        example: https://m.lordandtaylor.com/main/ProductDetail.jsp?FOLDER<>folder_id=2534374302030592&PRODUCT<>prd_id=845524442518220&R=845279061075
      - name: abTestName
        in: query
        description: Name of the abTest being run (if any)
        required: false
        schema:
          type: string
      - name: abTestVariant
        in: query
        description: Variant in the abTest (if any)
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ComHbcApiProductRecommendationsLatV1ModelsSimilarProductRecommendation'
components:
  schemas:
    ComHbcApiProductRecommendationsLatV1ModelsSimilarProductRecommendation:
      type: object
      required:
      - recommendations
      properties:
        recommendations:
          type: array
          items:
            $ref: '#/components/schemas/ComHbcApiProductRecommendationsLatV1ModelsRecommendation'
    ComHbcApiProductRecommendationsLatV1ModelsRecommendation:
      type: object
      required:
      - productId
      - productName
      - productUrl
      - productImageUrl
      - brandName
      - price
      properties:
        productId:
          type: string
        productName:
          type: string
        productUrl:
          type: string
        productImageUrl:
          type: string
        brandName:
          type: string
        price:
          $ref: '#/components/schemas/ComHbcApiProductRecommendationsLatV1ModelsPrice'
        rating:
          description: customer review's rating
          type: number
          format: double
        numReviews:
          description: number of customers that reviewed the product
          type: integer
          format: int64
    ComHbcApiProductRecommendationsLatV1ModelsPrice:
      description: Product price in USD
      type: object
      required:
      - was
      - now
      - onSale
      properties:
        was:
          description: formatted price in USD
          type: string
        now:
          description: formatted price in USD
          type: string
        onSale:
          description: true if now price is < was price. Used to
          type: boolean
    ComHbcApiProductRecommendationsLatV1EnumsSimilarProductContext:
      type: string
      enum:
      - pdp
