> ## Documentation Index
> Fetch the complete documentation index at: https://developers.criteo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# /preview/retail-media/chatbot-catalogs/{catalogid}/product-recommendations

> Ask a chatbot for a product recommendation



## OpenAPI

````yaml https://api.criteo.com/preview/retailmedia/open-api-specifications.json post /preview/retail-media/chatbot-catalogs/{catalogid}/product-recommendations
openapi: 3.0.1
info:
  title: Criteo API
  description: Criteo API - RetailMedia
  version: Preview
servers:
  - url: https://api.criteo.com
security:
  - oauth: []
tags:
  - name: Accounts
  - name: Analytics
  - name: Audience
  - name: Balance
  - name: Campaign
  - name: Catalog
  - name: Gateway
  - name: OnSiteRecommendation
  - name: ThirdPartyAccounts
paths:
  /preview/retail-media/chatbot-catalogs/{catalogid}/product-recommendations:
    post:
      tags:
        - OnSiteRecommendation
      summary: >-
        /preview/retail-media/chatbot-catalogs/{catalogid}/product-recommendations
      description: Ask a chatbot for a product recommendation
      operationId: chatbotProductRecommendations
      parameters:
        - name: catalogid
          in: path
          description: the identifier of the catalog to query
          required: true
          schema:
            title: catalogid
            type: string
            description: the identifier of the catalog to query
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/InbotDiscussionBodyModel'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MessageBodyModel'
      security:
        - oauth:
            - RetailMedia_OnSiteRecommendation_Read
components:
  schemas:
    InbotDiscussionBodyModel:
      title: InbotDiscussionBodyModel
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/InbotDiscussionDataInstanceModel'
      description: an API recommendation message
    MessageBodyModel:
      title: MessageBodyModel
      type: object
      properties:
        data:
          $ref: '#/components/schemas/MessageDataInstanceModel'
        errors:
          title: Errors
          type: array
          items:
            $ref: '#/components/schemas/MessageError'
          nullable: true
      description: error message
    InbotDiscussionDataInstanceModel:
      title: InbotDiscussionDataInstanceModel
      required:
        - attributes
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/InbotDiscussion'
        type:
          title: Type
          type: string
          default: InbotDiscussion
      description: an API recommendation request
    MessageDataInstanceModel:
      title: MessageDataInstanceModel
      required:
        - attributes
      type: object
      properties:
        attributes:
          $ref: '#/components/schemas/Message'
        type:
          title: Type
          type: string
          default: Message
          nullable: true
      description: an API answer message
      nullable: true
    MessageError:
      title: MessageError
      type: object
      properties:
        code:
          title: Code
          type: string
          description: error code
          nullable: true
        instance:
          title: Instance
          type: string
          description: specific occurrence of the problem
          nullable: true
        traceId:
          title: Traceid
          type: string
          description: correlation ID, unique to each request
          nullable: true
        type:
          title: Type
          type: string
          description: error category
          nullable: true
      description: error message
    InbotDiscussion:
      title: InbotDiscussion
      type: object
      properties:
        messages:
          title: Messages
          minItems: 1
          type: array
          items:
            $ref: '#/components/schemas/Message'
          description: >-
            ordered list of previous messages, alternating between user prompts
            and bot answers
      description: discussion between the user and the chatbot
    Message:
      title: Message
      type: object
      properties:
        botMessage:
          $ref: '#/components/schemas/BotMessage'
        userMessage:
          title: Usermessage
          type: string
          description: user prompt
          nullable: true
      description: message of the discussion
    BotMessage:
      title: BotMessage
      type: object
      properties:
        closing:
          title: Closing
          type: string
          description: closing remark from the bot
          nullable: true
        opening:
          title: Opening
          type: string
          description: >-
            opening comment from the bot, introducing the list of recommended
            products if relevant.
          nullable: true
        productRecos:
          title: Productrecos
          type: array
          items:
            $ref: '#/components/schemas/ProductRecommendation'
          description: list of recommended products
          nullable: true
      description: bot structured answer to the user prompt
      nullable: true
    ProductRecommendation:
      title: ProductRecommendation
      required:
        - rationale
      type: object
      properties:
        brand:
          title: Brand
          type: string
          description: brand of the product
          nullable: true
        currency:
          title: Currency
          type: string
          description: currency of the price of the product
          nullable: true
        description:
          title: Description
          type: string
          description: description of the product
          nullable: true
        imageUrl:
          title: Imageurl
          maxLength: 65536
          minLength: 1
          type: string
          description: url of the product image
          format: uri
          nullable: true
        name:
          title: Name
          type: string
          description: name of the product
          nullable: true
        price:
          title: Price
          type: number
          description: numerical value of the price of the product
          nullable: true
        rationale:
          title: Rationale
          type: string
          description: reason for this recommendation, given by the bot
        url:
          title: Url
          maxLength: 65536
          minLength: 1
          type: string
          description: url of the product on the retailer website
          format: uri
          nullable: true
      description: recommendation data for a product
  securitySchemes:
    oauth:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}
        authorizationCode:
          authorizationUrl: https://api.criteo.com/oauth2
          tokenUrl: https://api.criteo.com/oauth2/token
          scopes: {}

````