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

# Get Portfolio Items



## OpenAPI

````yaml /api-reference/openapi.json get /portfolio/items
openapi: 3.1.0
info:
  title: baselayer-api-service
  version: 0.1.0
servers:
  - url: https://api.baselayer.com/
security: []
paths:
  /portfolio/items:
    get:
      tags:
        - Portfolio Monitoring
      summary: Get Portfolio Items
      operationId: get_portfolio_items_portfolio_items_get
      parameters:
        - name: q
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: q
            description: >-
              The query param. Can be a business name, person name, business_id,
              person_id, or a type (business or person). If it is a business id
              or a person id (UUID), it will be used to search by id. If it is a
              business name or a person name, it will be used to search by name
              (case-insensitive). If it is a type (business or person), it will
              be used to search by type. If it is not provided, all portfolio
              items will be returned.
          description: >-
            The query param. Can be a business name, person name, business_id,
            person_id, or a type (business or person). If it is a business id or
            a person id (UUID), it will be used to search by id. If it is a
            business name or a person name, it will be used to search by name
            (case-insensitive). If it is a type (business or person), it will be
            used to search by type. If it is not provided, all portfolio items
            will be returned.
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            maximum: 1000
            minimum: 1
            description: >-
              Maximum number of records to return in a single page. Must be
              between 1 and 1000.
            default: 10
            title: Limit
          description: >-
            Maximum number of records to return in a single page. Must be
            between 1 and 1000.
        - name: offset
          in: query
          required: false
          schema:
            anyOf:
              - type: integer
                minimum: 0
              - type: 'null'
            description: >-
              Number of records to skip from the beginning. Use 0 for the first
              page. Cannot be used with cursor.
            title: Offset
          description: >-
            Number of records to skip from the beginning. Use 0 for the first
            page. Cannot be used with cursor.
        - name: cursor
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              Opaque pagination cursor token that identifies the position in the
              result set. Use the cursor from the previous response to get the
              next page. Cannot be used with offset.
            title: Cursor
          description: >-
            Opaque pagination cursor token that identifies the position in the
            result set. Use the cursor from the previous response to get the
            next page. Cannot be used with offset.
        - name: start_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
            title: Start Date
          description: 'Filter records created on or after this date (format: YYYY-MM-DD).'
        - name: end_date
          in: query
          required: false
          schema:
            anyOf:
              - type: string
                format: date
              - type: 'null'
            description: >-
              Filter records created on or before this date (format:
              YYYY-MM-DD).
            title: End Date
          description: 'Filter records created on or before this date (format: YYYY-MM-DD).'
        - name: tz
          in: query
          required: false
          schema:
            type: string
            description: >-
              IANA timezone identifier used to interpret start_date and end_date
              (defaults to UTC).
            examples:
              - UTC
              - America/Los_Angeles
              - Europe/London
            default: UTC
            title: Tz
          description: >-
            IANA timezone identifier used to interpret start_date and end_date
            (defaults to UTC).
      responses:
        '200':
          description: List of portfolio items.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.PortfolioItemSummaryResponse'
            application/vnd.baselayer.v1+json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/v1.PortfolioItemSummaryResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    v1.PortfolioItemSummaryResponse:
      description: >-
        Portfolio item summary response - either Business or Person based on the
        item type.


        This is a discriminated union that selects the appropriate response type

        based on the `type` field.
      discriminator:
        mapping:
          Business:
            $ref: '#/components/schemas/v1.BusinessPortfolioItemSummaryResponse'
          Person:
            $ref: '#/components/schemas/v1.PersonPortfolioItemSummaryResponse'
        propertyName: type
      oneOf:
        - $ref: '#/components/schemas/v1.BusinessPortfolioItemSummaryResponse'
        - $ref: '#/components/schemas/v1.PersonPortfolioItemSummaryResponse'
      title: PortfolioItemSummaryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    v1.BusinessPortfolioItemSummaryResponse:
      description: Represents a summary of a business portfolio item.
      properties:
        id:
          description: The unique identifier of the portfolio item.
          format: uuid
          title: Id
          type: string
        search_id:
          description: >-
            The unique identifier of the search that the portfolio item is based
            on.
          examples:
            - c623e29e-1f57-11ef-938f-1edb1b067314
          format: uuid
          title: Search Id
          type: string
        name:
          description: The name of the portfolio item.
          title: Name
          type: string
        group_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          default: null
          description: The unique identifier of the portfolio group.
          title: Group Id
        user:
          anyOf:
            - $ref: '#/components/schemas/v1.UserAttributionResponse'
            - type: 'null'
          default: null
          description: The user who created the portfolio item.
        created_at:
          description: The timestamp of when the portfolio item was created.
          format: date-time
          title: Created At
          type: string
        type:
          const: Business
          description: The type of the portfolio item.
          title: Type
          type: string
        business_id:
          description: The UUID of the business associated with the portfolio item.
          examples:
            - ede786f3-33ae-4894-843d-af2025f1d5b0
          format: uuid
          title: Business Id
          type: string
        business_url:
          description: The URL to the business details.
          format: uri
          maxLength: 2083
          minLength: 1
          title: Business Url
          type: string
        item_url:
          readOnly: true
          title: Item Url
          type: string
        group_url:
          anyOf:
            - type: string
            - type: 'null'
          readOnly: true
          title: Group Url
        console_url:
          readOnly: true
          title: Console Url
          type: string
      required:
        - id
        - search_id
        - name
        - created_at
        - type
        - business_id
        - business_url
        - item_url
        - group_url
        - console_url
      title: BusinessPortfolioItemSummaryResponse (v1)
      type: object
    v1.PersonPortfolioItemSummaryResponse:
      description: Represents a summary of a person portfolio item.
      properties:
        id:
          description: The unique identifier of the portfolio item.
          format: uuid
          title: Id
          type: string
        search_id:
          description: >-
            The unique identifier of the search that the portfolio item is based
            on.
          examples:
            - c623e29e-1f57-11ef-938f-1edb1b067314
          format: uuid
          title: Search Id
          type: string
        name:
          description: The name of the portfolio item.
          title: Name
          type: string
        group_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          default: null
          description: The unique identifier of the portfolio group.
          title: Group Id
        user:
          anyOf:
            - $ref: '#/components/schemas/v1.UserAttributionResponse'
            - type: 'null'
          default: null
          description: The user who created the portfolio item.
        created_at:
          description: The timestamp of when the portfolio item was created.
          format: date-time
          title: Created At
          type: string
        type:
          const: Person
          description: The type of the portfolio item.
          title: Type
          type: string
        person_id:
          description: The UUID of the person associated with the portfolio item.
          examples:
            - ede786f3-33ae-4894-843d-af2025f1d5b0
          format: uuid
          title: Person Id
          type: string
        person_url:
          description: The URL to the person details.
          format: uri
          maxLength: 2083
          minLength: 1
          title: Person Url
          type: string
        item_url:
          readOnly: true
          title: Item Url
          type: string
        group_url:
          anyOf:
            - type: string
            - type: 'null'
          readOnly: true
          title: Group Url
        console_url:
          readOnly: true
          title: Console Url
          type: string
      required:
        - id
        - search_id
        - name
        - created_at
        - type
        - person_id
        - person_url
        - item_url
        - group_url
        - console_url
      title: PersonPortfolioItemSummaryResponse (v1)
      type: object
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    v1.UserAttributionResponse:
      description: |-
        Response model for user attribution operations.

        This model defines the structure for user attribution API responses.
      properties:
        id:
          description: Unique identifier for the user.
          format: uuid
          title: Id
          type: string
        first_name:
          description: First name of the user.
          examples:
            - Austin
          title: First Name
          type: string
        last_name:
          description: Last name of the user.
          examples:
            - Taylor
          title: Last Name
          type: string
        email:
          description: Email address of the user.
          examples:
            - jessicasimpson@example.com
          title: Email
          type: string
      required:
        - id
        - first_name
        - last_name
        - email
      title: UserAttributionResponse (v1)
      type: object
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````