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

# Actualizar producto

> Modifica el nombre o activa/desactiva un producto.



## OpenAPI

````yaml /api-reference/openapi.yaml patch /products/{id}
openapi: 3.0.0
info:
  title: TapiPay Facade API
  version: 1.0.0
  description: >
    Facade API pública de la plataforma de cobranzas TapiPay.  Ofrece un
    contrato limpio y desacoplado del modelo interno del OFU,  permitiendo a los
    clientes crear y gestionar cobros (deudas puntuales,  suscripciones
    recurrentes, links de pago, productos y contactos)  sin conocer detalles
    internos de Company, Modalities o GenerationData.
  contact:
    name: TapiPay Team
    url: https://www.tapipay.com
  license:
    name: Proprietary
servers:
  - url: https://tapipay-facade.dev.tapila.cloud
    description: Desarrollo
security:
  - apiKeyAuth: []
    tapiAuth: []
paths:
  /products/{id}:
    patch:
      tags:
        - Products
      summary: Actualizar producto
      description: Modifica el nombre o activa/desactiva un producto.
      operationId: updateProduct
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: ID del producto (sin prefijo prod_)
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                active:
                  type: boolean
      responses:
        '200':
          description: Producto actualizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Product'
                  requestId:
                    type: string
        '400':
          description: Validación fallida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: No autenticado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Producto no encontrado
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Violación de regla de negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Product:
      type: object
      required:
        - productId
        - name
        - active
      properties:
        productId:
          type: string
          description: ID del producto en el OFU (sin prefijo prod_)
        name:
          type: string
          description: Nombre del producto
        active:
          type: boolean
          description: Estado del producto. Soft-delete pone active=false
        createdAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp de creación (ISO 8601). Null si no disponible.
        updatedAt:
          type: string
          format: date-time
          nullable: true
          description: Timestamp de última actualización (ISO 8601). Null si no disponible.
    Error:
      type: object
      required:
        - error
        - requestId
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - INVALID_REQUEST
                - AUTHENTICATION_FAILED
                - RESOURCE_NOT_FOUND
                - RESOURCE_CONFLICT
                - RESOLUTION_ERROR
                - BUSINESS_RULE_VIOLATION
                - RATE_LIMITED
                - INTERNAL_ERROR
              description: Código de error estándar
            message:
              type: string
              description: Mensaje legible del error
            details:
              type: array
              description: Array de detalles adicionales (validaciones por campo, etc.)
              items:
                type: object
                properties:
                  field:
                    type: string
                  issue:
                    type: string
        requestId:
          type: string
          pattern: ^req_[a-zA-Z0-9]+$
          description: ID único del request para trazabilidad
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: >
        API key del API Gateway de Tapi. Requerida en todas las operaciones.
        Distinta por ambiente (desarrollo, homologación, producción).
    tapiAuth:
      type: apiKey
      in: header
      name: x-authorization-token
      description: >
        Token TAPI JWT. Requerido en todas las operaciones. Se envía sin prefijo
        "Bearer". Ej: x-authorization-token: eyJhbGci...

````