> ## Documentation Index
> Fetch the complete documentation index at: https://v1-learn.neoartd.my.id/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Voucher



## OpenAPI

````yaml api/voucher.json put /voucher/{id}
openapi: 3.0.1
info:
  title: Voucher API
  description: An API for Voucher documentation management and resource access.
  version: 1.0.0
servers:
  - url: https://blessed-toad-definitely.ngrok-free.app/api
security: []
paths:
  /voucher/{id}:
    put:
      summary: Update Voucher
      operationId: updateVoucher
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
            description: Unique identifier for the voucher
            example: 1
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VoucherInput'
      responses:
        '200':
          description: Voucher updated successfully
components:
  schemas:
    VoucherInput:
      type: object
      properties:
        namaVoucher:
          type: string
          description: Name of the voucher
          example: Voucher Hari Ini
        diskonRate:
          type: number
          description: Discount rate of the voucher
          example: 10
        tanggalExpired:
          type: string
          format: date
          description: Expired date of the voucher
          example: '2021-12-31'
      required:
        - namaVoucher
        - diskonRate
        - tanggalExpired

````