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

# Get discount

> Returns a single discount by id.



## OpenAPI

````yaml /openapi.yaml get /v1/discounts/{id}
openapi: 3.0.3
info:
  title: Quentli REST API
  version: 1.0.0
  description: OpenAPI spec for Quentli REST endpoints.
servers:
  - url: https://api.quentli.com
    description: Production API
  - url: https://api.staging.quentli.com
    description: Staging API for production-like validation
  - url: https://api.demo.quentli.com
    description: Demo API hostname served by staging
security:
  - organizationApiKey: []
tags:
  - name: Auth
  - name: Billing
  - name: Catalog
  - name: Customers
  - name: Invoices
  - name: Payment Methods
  - name: Payment Sessions
  - name: Payments
  - name: Subscriptions
  - name: Tax Invoices
  - name: Webhooks
paths:
  /v1/discounts/{id}:
    get:
      tags:
        - Catalog
      summary: Get discount
      description: Returns a single discount by id.
      operationId: discounts_get_by_id
      parameters:
        - schema:
            type: string
            description: Identifier of the discount.
          required: true
          description: Identifier of the discount.
          name: id
          in: path
      responses:
        '200':
          description: Discount details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetDiscountResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '403':
          description: Permission denied
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
        '404':
          description: Discount not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserError'
components:
  schemas:
    GetDiscountResponse:
      type: object
      nullable: true
      properties:
        id:
          type: string
          description: Unique identifier of the discount.
          example: disc_1234567890abcdefghij
        createdAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the discount was created.
          example: '2025-01-01T00:00:00.000Z'
        updatedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
          description: When the discount was last updated.
          example: '2025-01-01T00:00:00.000Z'
        deletedAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
            - nullable: true
          description: When the discount was deleted, if applicable.
          example: null
        name:
          type: string
          description: Display name of the discount.
          example: Buen Fin 20%
        description:
          type: string
          nullable: true
          description: Optional description of the discount.
          example: null
        organizationId:
          type: string
          description: Identifier of the owning organization.
          example: org_1234567890abcdefghij
        type:
          type: string
          enum:
            - FIXED
            - PERCENTAGE
          description: >-
            Whether the discount is a fixed amount (FIXED) or a percentage
            (PERCENTAGE).
          example: PERCENTAGE
        amountOff:
          type: integer
          nullable: true
          description: >-
            Fixed discount amount in minor currency units. Only set when type is
            FIXED.
          example: 30000
        percentageOff:
          type: number
          nullable: true
          description: Percentage to discount. Only set when type is PERCENTAGE.
          example: 20
        active:
          type: boolean
          description: Whether the discount is currently available for new applications.
          example: true
        oneOff:
          type: boolean
          description: Whether this discount was created for a single-use custom charge.
          example: false
        expiresAt:
          anyOf:
            - type: string
              description: Date string
            - type: string
              format: date-time
              description: Date object
            - nullable: true
          description: Optional date after which the discount can no longer be applied.
          example: null
        maxApplications:
          type: integer
          nullable: true
          description: >-
            Maximum total number of times this discount can be applied across
            all customers.
          example: 3
      required:
        - id
        - createdAt
        - updatedAt
        - deletedAt
        - name
        - description
        - organizationId
        - type
        - amountOff
        - percentageOff
        - active
        - oneOff
        - expiresAt
        - maxApplications
      description: Discount details. Returns null if not found.
    UserError:
      type: object
      properties:
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - error
      additionalProperties: false
      description: Standard user-facing error response envelope.
  securitySchemes:
    organizationApiKey:
      type: http
      scheme: bearer
      description: 'Organization API key using `Authorization: Bearer sk_...`.'

````