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

# Update an existing discount

> Operacion: Update an existing discount.



## OpenAPI

````yaml /generated/specs/finance.json put /api/v1/descuentos/{id}
openapi: 3.0.0
info:
  title: Raul API - Finanzas
  description: >-
    Facturas, boletas, ejecuciones de billing, cuentas por pagar y medios de
    pago.
  version: 2.0.0
  contact: {}
servers:
  - url: https://api.raul.ugps.io
    description: Production
security: []
tags: []
paths:
  /api/v1/descuentos/{id}:
    put:
      tags:
        - Billing - Descuentos
      summary: Update an existing discount
      description: 'Operacion: Update an existing discount.'
      operationId: DescuentoController_update
      parameters:
        - name: id
          required: true
          in: path
          description: Discount UUID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateDescuentoDto'
      responses:
        '200':
          description: Discount updated successfully
        '400':
          description: Validation error
        '404':
          description: Discount not found
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateDescuentoDto:
      type: object
      properties:
        subscription_ids:
          description: Array of subscription UUIDs for multi-subscription discounts
          type: array
          items:
            type: string
        motivo_descuento_id:
          type: string
          description: Motivo descuento UUID
        motivo_otro:
          type: string
          description: Custom reason text
        tipo_descuento:
          type: string
          description: Discount type
          enum:
            - porcentaje
            - monto_clp
            - monto_uf
        valor:
          type: number
          description: Discount value
        periodo_inicio:
          type: string
          description: Start period in YYYY-MM format
        duracion_meses:
          type: number
          description: Duration in months
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Token de sesión Better Auth para rutas de backoffice; las rutas de
        portal usan su token propio.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.