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

# Get item details

> Retrieves details for a single product identified by its dfid, in the context of a specific widget's search engine



## OpenAPI

````yaml /openapi/recommendations-v1.yaml get /api/widget/{widget_id}/item
openapi: 3.0.0
info:
  title: Recommendations API
  contact:
    name: Doofinder Support
    url: https://docs.doofinder.com/
  version: 1.0.0
  description: >
    # Introduction


    Recommendations API allows you to retrieve personalized product
    recommendations

    for your ecommerce website using Doofinder's recommendation engine.


    # Basics


    ## Endpoint


    All requests should be done with `https` protocol in our api location.

    `https://{search_zone}-recommendations.doofinder.com`

    where `{search_zone}` depends on your location, is the geographic zone your
    recommendation engine is located at.

    i.e.: eu1. Also, indicates which host to use in your API calls.


    ## Conventions


    Along most of the code samples you will find placeholders for some common
    variable values. They are:

    - `{widget_id}`: The recommendation widget's unique UUID. i.e.:
    123e4567-e89b-12d3-a456-426614174000

    - `{session_id}`: Session identifier for tracking user behavior. i.e.:
    b2b89619844f4eb0b5fa19f28a19d679

    - `{user_id}`: Unique user identifier. i.e.:
    8c80694b-354c-4533-acd1-e4b8e7d74b7b

    - `{hashid}`: The hash identifier for the search engine. i.e.:
    de8f052ea612f95b6950d4013dd6ef38


    ## Caveats


    ### Session IDs


    Some types of recommendations rely on user data to provide personalized
    product recommendations.

    If such data is not provided, the API will use fallback results, if fallback
    is enabled.

    If neither user data is provided nor fallback is enabled, then no
    recommendations will be returned.


    Currently, the **Browsing history** recommendation type is the only one that
    requires a `session_id` to be included in the request.


    ### CORS


    If CORS is enabled for your ecommerce site, it is important to ensure that
    the domain from which you make requests is correctly included

    in the request's `Origin` and/or `Referer` headers. This allows the domain
    to be validated against the list of allowed domains for your store.

    Otherwise, a **`403 Forbidden Origin`** will be returned, blocking the
    request for security reasons.


    ### Blocked IPs


    If the IP address from which the request originates is blacklisted in your
    store configuration, a **`403 Forbidden IP`**

    will be returned, blocking the request for security reasons.
  termsOfService: https://www.doofinder.com/es/terms-and-conditions
  x-logo:
    url: https://admin.doofinder.com/images/logo.svg
    backgroundColor: '#33268C'
    altText: Doofinder Recommendations Engine
servers:
  - url: https://{search_zone}-recommendations.doofinder.com
    variables:
      search_zone:
        enum:
          - eu1
          - us1
          - ap1
        default: eu1
security: []
tags:
  - name: Recommendations
    description: Recommendation operations for personalized product suggestions.
paths:
  /api/widget/{widget_id}/item:
    get:
      tags:
        - Recommendations
      summary: Get item details
      description: >-
        Retrieves details for a single product identified by its dfid, in the
        context of a specific widget's search engine
      operationId: getWidgetItem
      parameters:
        - name: widget_id
          in: path
          required: true
          description: Unique identifier for the widget
          schema:
            type: string
            format: uuid
            example: 123e4567-e89b-12d3-a456-426614174000
        - name: dfid
          in: query
          required: true
          description: Doofinder's unique ID for the item
          schema:
            type: string
            example: >-
              123e4567e89b12d3a456426614174000@product@e7b7a6c35b2d4afc94991bfc8100227a
        - name: price_name
          in: query
          required: false
          description: Currency code used to select the item's price field (optional)
          schema:
            type: string
            example: EUR
      responses:
        '200':
          description: Item found, or lookup failed upstream (see response shape)
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: The item data
                  - type: object
                    properties:
                      status:
                        type: string
                        example: ERROR
        '400':
          description: Bad Request - Missing required parameters or validation errors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '403':
          description: Forbidden - Access denied
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    enum:
                      - Forbidden origin
                      - Forbidden ip
                example:
                  error: Forbidden origin
        '404':
          description: Not Found - Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '429':
          description: Too Many Requests - Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: Too many request
components:
  schemas:
    BadRequestError:
      type: object
      properties:
        error:
          type: string
          description: General error message
          example: Bad request
        details:
          type: object
          description: Field-specific validation errors
          additionalProperties:
            type: array
            items:
              type: string
          example:
            session_id:
              - length must be less than or equal to 32
            user_id:
              - is required
            current_url:
              - is required
      required:
        - error
    NotFoundError:
      type: object
      properties:
        error:
          type: string
          description: Error message
          example: Not found
        resource:
          type: string
          description: Type of resource that was not found
          example: Widget
        resource_id:
          type: string
          description: ID of the resource that was not found
          example: cc1e4567-e89b-12d3-a456-426614174000
      required:
        - error

````