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

# Patch Product Visibility Endpoint



## OpenAPI

````yaml /api-reference/openapi/foundation-portal.json patch /api/v1/merchants/{merchant_id}/products/visibility
openapi: 3.1.0
info:
  title: Depict Foundation Portal API
  version: 1.0.0
  description: >-
    REST API behind the Depict Foundation merchant portal: merchants, products,
    collections, curation, metrics, analytics and search insights. All endpoints
    require an Auth0-issued bearer token.
servers:
  - url: ''
security: []
paths:
  /api/v1/merchants/{merchant_id}/products/visibility:
    patch:
      tags:
        - Products
      summary: Patch Product Visibility Endpoint
      operationId: >-
        patch_product_visibility_endpoint_api_v1_merchants__merchant_id__products_visibility_patch
      parameters:
        - name: merchant_id
          in: path
          required: true
          schema:
            type: string
            title: Merchant Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductVisibilityPatchRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProductVisibilityResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Auth0: []
components:
  schemas:
    ProductVisibilityPatchRequest:
      properties:
        scope:
          type: string
          enum:
            - market
            - market_group
            - global_market_group
          title: Scope
          default: market_group
        market_id:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Market Id
        market_group_id:
          anyOf:
            - type: string
              maxLength: 256
              minLength: 1
            - type: 'null'
          title: Market Group Id
        updates:
          items:
            $ref: '#/components/schemas/ProductVisibilityUpdateRequest'
          type: array
          maxItems: 100
          minItems: 1
          title: Updates
      type: object
      required:
        - updates
      title: ProductVisibilityPatchRequest
    ProductVisibilityResponse:
      properties:
        visibility:
          additionalProperties:
            additionalProperties:
              additionalProperties:
                $ref: '#/components/schemas/ProductVisibilitySurfaceState'
              type: object
            type: object
          type: object
          title: Visibility
      type: object
      required:
        - visibility
      title: ProductVisibilityResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ProductVisibilityUpdateRequest:
      properties:
        main_product_id:
          type: string
          maxLength: 512
          minLength: 1
          title: Main Product Id
        plp:
          anyOf:
            - type: string
              enum:
                - hidden_explicit
                - visible_explicit
                - inherit
            - type: 'null'
          title: Plp
        search:
          anyOf:
            - type: string
              enum:
                - hidden_explicit
                - visible_explicit
                - inherit
            - type: 'null'
          title: Search
        recs:
          anyOf:
            - type: string
              enum:
                - hidden_explicit
                - visible_explicit
                - inherit
            - type: 'null'
          title: Recs
        expected_updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Expected Updated At
      type: object
      required:
        - main_product_id
      title: ProductVisibilityUpdateRequest
    ProductVisibilitySurfaceState:
      properties:
        visible:
          type: boolean
          title: Visible
        hidden:
          type: boolean
          title: Hidden
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        scope:
          anyOf:
            - type: string
            - type: 'null'
          title: Scope
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
        updated_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Updated At
        resolved_market_group_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Resolved Market Group Id
      type: object
      required:
        - visible
        - hidden
      title: ProductVisibilitySurfaceState
    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:
    Auth0:
      type: oauth2
      flows:
        authorizationCode:
          scopes:
            openid: OpenID Connect
            profile: User profile
            email: User email
          authorizationUrl: https://depict.eu.auth0.com/oauth/authorize
          tokenUrl: https://depict.eu.auth0.com/oauth/token
      x-tokenName: id_token

````