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

# Get Item By Producer Id

> Retrieve item IDs for one or more producer IDs owned by a publisher.

<Card title="Error Reference: Content Controls" icon="triangle-exclamation" href="/api-reference/general/errors#content-controls-data-engine">
  Common errors: invalid item or publisher IDs, missing producer IDs, item not found, insufficient permissions.
</Card>


## OpenAPI

````yaml post /engine/v2/publisher/{publisher_id}/items/by-producer
openapi: 3.1.0
info:
  title: AI API
  description: |-
    Optimized for high-speed inference and scalability by Gloo AI

    [Swagger UI](./docs) | [ReDoc UI](./redoc)
  version: 1.0.0
servers:
  - url: https://platform.ai.gloo.com
security:
  - bearerAuth: []
tags:
  - name: Content Controls
  - name: Data Engine
  - name: Ingestion & Enrichment
  - name: answers
  - name: chat
  - name: completions
  - name: content
  - name: core
  - name: data
  - name: get-models
  - name: ingestion
  - name: sotc
paths:
  /engine/v2/publisher/{publisher_id}/items/by-producer:
    post:
      tags:
        - Data Engine
        - Content Controls
      summary: Get Item By Producer Id
      description: Retrieve item IDs for one or more producer IDs owned by a publisher.
      operationId: >-
        get_item_by_producer_id_engine_v2_publisher__publisher_id__items_by_producer_post
      parameters:
        - name: publisher_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Publisher Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProducerItemLookupRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ProducerItemMapping'
        '400':
          description: Bad Request - Publisher not found or no producer IDs provided
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              examples:
                publisher_not_found:
                  summary: Publisher not found
                  value:
                    detail:
                      code: publisher_not_found
                      message: Publisher not found
                missing_producer_ids:
                  summary: No producer IDs provided
                  value:
                    detail:
                      code: Invalid request
                      message: At least one producer_id must be provided
        '403':
          description: Forbidden - Publisher access denied
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              example:
                detail:
                  message: Publisher does not belong to your organization
                  code: PUBLISHER_ACCESS_DENIED
        '404':
          description: No matching items found for the provided producer IDs
          content:
            application/json:
              schema:
                additionalProperties: true
                type: object
              example:
                detail:
                  code: Items not found
                  message: No items were found for the provided producer IDs
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    ProducerItemLookupRequest:
      properties:
        producer_ids:
          type: array
          items:
            type: string
            title: Producer Id
          minItems: 1
          title: Producer Ids
          description: List of producer IDs to resolve into item IDs.
      type: object
      required:
        - producer_ids
      title: ProducerItemLookupRequest
      description: Request payload for resolving producer IDs to item IDs.
    ProducerItemMapping:
      properties:
        producer_id:
          type: string
          title: Producer Id
          description: Producer-specific identifier supplied by the publisher.
        item_id:
          type: string
          format: uuid
          title: Item Id
          description: Resolved item ID corresponding to the producer ID.
      type: object
      required:
        - producer_id
        - item_id
      title: ProducerItemMapping
      description: Mapping between a producer ID and its associated item ID.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer authentication header of the form Bearer `<token>`, where
        `<token>` is your [auth token](/studio/manage-api-credentials).
    HTTPBearer:
      type: http
      scheme: bearer

````