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

# Update discount details

> Updates information for a specific discount, such as code, amount, or expiration date. Use to edit existing discount offers.



## OpenAPI

````yaml patch /discounts/{id}
openapi: 3.0.0
info:
  title: Blink API
  description: Comprehensive API documentation for Blink.
  version: 1.0.0
servers:
  - url: https://api.blink.store/v1
security: []
paths:
  /discounts/{id}:
    patch:
      tags:
        - Discounts
      summary: Update discount details
      description: >-
        Updates information for a specific discount, such as code, amount, or
        expiration date. Use to edit existing discount offers.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DiscountUpdateRequest'
      responses:
        '200':
          description: Discount updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DiscountDetailResponse'
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          description: Not Found
components:
  schemas:
    DiscountUpdateRequest:
      type: object
      properties:
        name:
          type: string
        code:
          type: string
        discount_type:
          type: string
        discount_amount:
          type: number
        status:
          type: string
        max_redemptions:
          type: integer
        starts_at:
          type: string
          format: date-time
        expires_at:
          type: string
          format: date-time
        product_ids:
          type: array
          items:
            type: string
    DiscountDetailResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
            code:
              type: string
            discount_type:
              type: string
            discount_amount:
              type: number
            max_redemptions:
              type: integer
            starts_at:
              type: string
              format: date-time
            expires_at:
              type: string
              format: date-time
            status:
              type: string
            product_ids:
              type: array
              items:
                type: string

````