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

# Actualizar producto

> Actualiza un producto y devuelve el detalle persistido.



## OpenAPI

````yaml /api-reference/openapi.json put /api/v1/products/{product_id}
openapi: 3.1.0
info:
  title: La Pyme API
  description: >-
    Resources and workflows for purchases, sales, inventory, contacts, products,
    reports, and settings.
  version: 1.0.0
  contact:
    name: La Pyme Support
    email: hola@lapyme.com.ar
  license:
    name: Proprietary
    url: https://lapyme.com.ar/terminos
servers:
  - url: https://api.lapyme.com.ar
    description: Servidor de producción
security:
  - bearerAuth: []
tags:
  - name: API
    description: Public API operations for La Pyme integrations.
paths:
  /api/v1/products/{product_id}:
    put:
      tags:
        - API
      summary: Actualizar producto
      description: Actualiza un producto y devuelve el detalle persistido.
      operationId: updateApiProduct
      parameters:
        - name: product_id
          in: path
          description: ID del producto
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Request-Id
          in: header
          description: >-
            ID opcional de la solicitud para trazabilidad. Si se omite, el
            servidor genera uno.
          required: false
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiProductUpdateRequest'
      responses:
        '200':
          description: Producto actualizado exitosamente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiProductUpdateResponse'
        '400':
          description: Solicitud inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INVALID_REQUEST
                  value:
                    request_id: req_product_update_1
                    error:
                      code: INVALID_REQUEST
                      message: Invalid request for updating products
                      retryable: false
                      type: invalid_request_error
                      details: []
        '401':
          description: API key faltante o inválida
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: AUTHENTICATION_REQUIRED
                  value:
                    request_id: req_product_update_1
                    error:
                      code: AUTHENTICATION_REQUIRED
                      message: API key is required in the Authorization header
                      retryable: false
                      type: invalid_request_error
                      details: []
        '403':
          description: Scopes insuficientes
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: FORBIDDEN
                  value:
                    request_id: req_product_update_1
                    error:
                      code: FORBIDDEN
                      message: Your API key does not have permission for this operation
                      retryable: false
                      type: invalid_request_error
                      details: []
        '404':
          description: Producto o recurso relacionado inexistente
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: NOT_FOUND
                  value:
                    request_id: req_product_update_1
                    error:
                      code: NOT_FOUND
                      message: Product not found
                      retryable: false
                      type: invalid_request_error
                      details: []
        '409':
          description: Conflicto de negocio
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: CONFLICT
                  value:
                    request_id: req_product_update_1
                    error:
                      code: CONFLICT
                      message: A product with this SKU already exists
                      retryable: false
                      type: invalid_request_error
                      details: []
        '429':
          description: Límite de solicitudes excedido para la organización
          headers:
            Retry-After:
              description: Segundos a esperar antes de volver a intentar la solicitud.
              schema:
                type: string
                example: '30'
            X-RateLimit-Limit:
              description: Límite de la ventana activa.
              schema:
                type: string
                example: '5000'
            X-RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa.
              schema:
                type: string
                example: '0'
            X-RateLimit-Reset:
              description: Segundos restantes hasta el reset de la ventana activa.
              schema:
                type: string
                example: '30'
            RateLimit-Limit:
              description: Límite de la ventana activa en formato estándar.
              schema:
                type: string
                example: '5000'
            RateLimit-Remaining:
              description: Solicitudes restantes en la ventana activa en formato estándar.
              schema:
                type: string
                example: '0'
            RateLimit-Reset:
              description: >-
                Segundos hasta el reset de la ventana activa en formato
                estándar.
              schema:
                type: string
                example: '30'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: RATE_LIMITED
                  value:
                    request_id: req_rate_limit_1
                    error:
                      type: rate_limit_error
                      code: RATE_LIMITED
                      message: >-
                        The organization request limit was reached. Try again
                        later.
                      retryable: true
                      details: []
        '500':
          description: Error interno del servidor
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiErrorEnvelope'
              examples:
                default:
                  summary: INTERNAL_ERROR
                  value:
                    request_id: req_product_update_1
                    error:
                      code: INTERNAL_ERROR
                      message: Could not update the product
                      retryable: false
                      type: invalid_request_error
                      details: []
      x-codeSamples:
        - lang: typescript
          label: La Pyme SDK
          source: |
            import { Lapyme } from "lapyme";

            const lapyme = new Lapyme({
              bearerAuth: process.env["LAPYME_API_KEY"] ?? "",
            });

            const product = await lapyme.products.update({
              productId: "9c692e8b-0f9a-4f7c-8b99-061a2eb188ae",
              body: {
                price: 1390000,
              },
            });
components:
  schemas:
    ApiProductUpdateRequest:
      type: object
      properties:
        name:
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        category_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        visibility:
          type: string
          enum:
            - both
            - sales
            - purchases
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            External product image URL reference. La Pyme displays it best
            effort and does not copy, ingest, or host the image.
        product_type:
          $ref: '#/components/schemas/ApiSharedEnumff49232140'
        sku:
          type: string
        barcode:
          anyOf:
            - type: string
            - type: 'null'
        unit_of_measure:
          type: string
          enum:
            - '10'
            - '11'
            - '12'
            - '13'
            - '14'
            - '15'
            - '16'
            - '17'
            - '18'
            - '19'
            - '20'
            - '21'
            - '22'
            - '23'
            - '24'
            - '25'
            - '26'
            - '27'
            - '28'
            - '29'
            - '30'
            - '31'
            - '32'
            - '33'
            - '34'
            - '35'
            - '36'
            - '37'
            - '41'
            - '47'
            - '48'
            - '49'
            - '50'
            - '51'
            - '52'
            - '53'
            - '54'
            - '55'
            - '61'
            - '62'
            - '63'
            - '97'
            - '98'
            - '99'
            - '00'
            - '01'
            - '02'
            - '03'
            - '04'
            - '05'
            - '06'
            - '07'
            - '08'
            - '09'
        currency:
          $ref: '#/components/schemas/ApiSharedEnum6cfb146157'
        cost:
          type: integer
          minimum: 0
        price:
          description: >-
            Manual sale price in cents. Mutually exclusive with
            markup_percentage; send price for manual pricing or
            markup_percentage for markup pricing.
          type: integer
          minimum: 0
        promotional_price:
          anyOf:
            - type: integer
              minimum: 0
            - type: 'null'
        markup_percentage:
          description: >-
            Markup percentage used to calculate the sale price from cost, tax,
            and organization rounding rules. Mutually exclusive with price; send
            null to switch back to manual pricing.
          anyOf:
            - type: number
              minimum: 0
              maximum: 10000
            - type: 'null'
        tax_rate_id:
          type: integer
        is_exempt:
          type: boolean
        default_supplier_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        default_sales_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        default_purchase_account_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
        warehouse_stocks:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject6dbe49c4ef'
        is_active:
          type: boolean
      additionalProperties: false
    ApiProductUpdateResponse:
      type: object
      properties:
        request_id:
          type: string
        data:
          type: object
          properties:
            product:
              $ref: '#/components/schemas/ApiSharedObject36dfdd5b32'
          required:
            - product
          additionalProperties: false
        warnings:
          type: array
          items: {}
      required:
        - request_id
        - data
        - warnings
      additionalProperties: false
    ApiErrorEnvelope:
      type: object
      properties:
        request_id:
          type: string
        error:
          type: object
          properties:
            type:
              type: string
              enum:
                - api_error
                - authentication_error
                - authorization_error
                - business_error
                - external_dependency_error
                - idempotency_error
                - invalid_request_error
                - rate_limit_error
            code:
              type: string
            message:
              type: string
            retryable:
              type: boolean
            details:
              type: array
              items:
                $ref: '#/components/schemas/ApiSharedObjectc671832641'
          required:
            - type
            - code
            - message
            - retryable
            - details
          additionalProperties: false
      required:
        - request_id
        - error
      additionalProperties: false
    ApiSharedEnumff49232140:
      type: string
      enum:
        - product
        - service
        - combo
        - kit
    ApiSharedEnum6cfb146157:
      type: string
      enum:
        - PES
        - DOL
    ApiSharedObject6dbe49c4ef:
      type: object
      properties:
        warehouse_id:
          type: string
          format: uuid
        quantity:
          type: number
          minimum: 0
      required:
        - warehouse_id
        - quantity
      additionalProperties: false
    ApiSharedObject36dfdd5b32:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          anyOf:
            - type: string
            - type: 'null'
        category:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedObject8aeeceaf0f'
            - type: 'null'
        sku:
          type: string
        barcode:
          anyOf:
            - type: string
            - type: 'null'
        image_url:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            External product image URL reference. La Pyme displays it best
            effort and does not copy, ingest, or host the image.
        currency:
          type: string
        cost:
          type: number
        price:
          type: number
        tax_rate:
          $ref: '#/components/schemas/ApiSharedObjectee5eae48b0'
        default_supplier:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedObject8aeeceaf0f'
            - type: 'null'
        product_type:
          $ref: '#/components/schemas/ApiSharedEnumff49232140'
        is_active:
          type: boolean
        organization_slug:
          type: string
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        effective_price:
          type: number
        price_source:
          $ref: '#/components/schemas/ApiSharedEnumfe93f70a59'
        applied_price_list:
          $ref: '#/components/schemas/ApiSharedObjectfc277c542a'
        object:
          type: string
          const: product
        tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject8a94344083'
        variant_group_id:
          type: string
          format: uuid
        variant_options:
          anyOf:
            - type: object
              propertyNames:
                type: string
              additionalProperties:
                type: string
            - type: 'null'
        is_exempt:
          type: boolean
        metafields:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObject0347948139'
        stock_summary:
          $ref: '#/components/schemas/ApiSharedObjecta9f7340006'
      required:
        - id
        - name
        - description
        - category
        - sku
        - barcode
        - image_url
        - currency
        - cost
        - price
        - tax_rate
        - default_supplier
        - product_type
        - is_active
        - organization_slug
        - created_at
        - updated_at
        - object
        - tags
        - variant_group_id
        - variant_options
        - is_exempt
        - metafields
        - stock_summary
      additionalProperties: false
    ApiSharedObjectc671832641:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
        field:
          type: string
      required:
        - code
        - message
      additionalProperties: false
    ApiSharedObject8aeeceaf0f:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
      required:
        - id
        - name
      additionalProperties: false
    ApiSharedObjectee5eae48b0:
      type: object
      properties:
        id:
          type: number
        value:
          type: number
      required:
        - id
        - value
      additionalProperties: false
    ApiSharedEnumfe93f70a59:
      type: string
      enum:
        - automatic
        - manual_override
        - manual_fallback
        - base
    ApiSharedObjectfc277c542a:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        is_automatic:
          type: boolean
        automatic_pricing_mode:
          $ref: '#/components/schemas/ApiSharedEnum3c5633618c'
        adjustment_percentage:
          anyOf:
            - type: number
            - type: 'null'
        tax_inclusive:
          type: boolean
      required:
        - id
        - name
        - is_automatic
        - automatic_pricing_mode
        - adjustment_percentage
        - tax_inclusive
      additionalProperties: false
    ApiSharedObject8a94344083:
      type: object
      properties:
        object:
          type: string
          const: tag
        id:
          type: string
          format: uuid
        scope:
          $ref: '#/components/schemas/ApiSharedEnum09f8155a9a'
        name:
          type: string
        slug:
          type: string
        color:
          anyOf:
            - $ref: '#/components/schemas/ApiSharedEnum599647cb76'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
        archived_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - object
        - id
        - scope
        - name
        - slug
        - color
        - description
        - archived_at
        - created_at
        - updated_at
      additionalProperties: false
    ApiSharedObject0347948139:
      type: object
      properties:
        key:
          type: string
        value:
          type: string
      required:
        - key
        - value
      additionalProperties: false
    ApiSharedObjecta9f7340006:
      type: object
      properties:
        total_quantity:
          type: number
        warehouse_count:
          type: integer
          minimum: 0
        by_warehouse:
          type: array
          items:
            $ref: '#/components/schemas/ApiSharedObjectf20bf16616'
      required:
        - total_quantity
        - warehouse_count
        - by_warehouse
      additionalProperties: false
    ApiSharedEnum3c5633618c:
      type: string
      enum:
        - base_price_adjustment
        - cost_markup
    ApiSharedEnum09f8155a9a:
      type: string
      enum:
        - customer
        - supplier
        - product
        - sale
        - purchase
        - purchase_order
        - transfer
    ApiSharedEnum599647cb76:
      type: string
      enum:
        - slate
        - red
        - orange
        - amber
        - yellow
        - lime
        - green
        - teal
        - cyan
        - blue
        - indigo
        - violet
        - pink
    ApiSharedObjectf20bf16616:
      type: object
      properties:
        warehouse_id:
          type: string
          format: uuid
        warehouse_name:
          type: string
        quantity:
          type: number
        on_hand:
          type: number
        reserved_quantity:
          type: number
        incoming_quantity:
          type: number
      required:
        - warehouse_id
        - warehouse_name
        - quantity
        - on_hand
        - reserved_quantity
        - incoming_quantity
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: Incluí tu API key en el header Authorization con el prefijo Bearer.

````