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

# List discounts

> Retrieve a paginated list of discounts with powerful filtering options.
    
    Discounts can be coupon codes that customers enter at checkout, or automatic sale discounts applied based on conditions.
    Results are sorted by creation date (newest first) by default.



## OpenAPI

````yaml /api-reference/api-docs.yaml get /v0/discounts/list
openapi: 3.1.0
info:
  title: Fungies API v0
  version: 0.3.5
servers:
  - url: https://api.fungies.io
security: []
tags:
  - name: discounts
    description: Discounts related endpoints
  - name: keys
    description: Offer product keys related endpoints
  - name: orders
    description: Orders related endpoints
  - name: payments
    description: Payments related endpoints
  - name: offers
    description: Offers related endpoints
  - name: products
    description: Products related endpoints
  - name: subscriptions
    description: Subscriptions related endpoints
  - name: users
    description: Users related endpoints
  - name: variants
    description: Product variants related endpoints
  - name: plans
    description: Product plans related endpoints
  - name: elements
    description: Elements related endpoints
paths:
  /v0/discounts/list:
    get:
      tags:
        - discounts
      summary: List discounts
      description: |-
        Retrieve a paginated list of discounts with powerful filtering options.
            
            Discounts can be coupon codes that customers enter at checkout, or automatic sale discounts applied based on conditions.
            Results are sorted by creation date (newest first) by default.
      operationId: GetV0DiscountsList
      parameters:
        - name: ids
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterIds'
        - name: termOrId
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterTermOrId'
        - name: status
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterStatus'
        - name: type
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterType'
        - name: currency
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterCurrency'
        - name: validFrom
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterValidFrom'
        - name: validUntil
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterValidUntil'
        - name: orderBy
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterOrderBy'
        - name: orderDirection
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterOrderDirection'
        - name: skip
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterSkip'
        - name: take
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterTake'
        - name: archived
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterArchived'
        - name: expired
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterExpired'
        - name: withArchived
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterWithArchived'
        - name: returnCount
          in: query
          required: false
          description: GET /v0/discounts/list Parameter
          schema:
            $ref: '#/components/schemas/GetV0DiscountsListParameterReturnCount'
      responses:
        '200':
          description: GET /v0/discounts/list Positive response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV0DiscountsListPositiveResponse'
        '400':
          description: GET /v0/discounts/list Negative response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetV0DiscountsListNegativeResponse'
              examples:
                example1:
                  value:
                    status: error
                    error:
                      message: Sample error message
      security:
        - APIKEY_1: []
components:
  schemas:
    GetV0DiscountsListParameterIds:
      type: array
      items:
        type: string
        format: uuid
    GetV0DiscountsListParameterTermOrId:
      type: string
    GetV0DiscountsListParameterStatus:
      type: string
      enum:
        - active
        - inactive
    GetV0DiscountsListParameterType:
      type: string
      enum:
        - code
        - sale
    GetV0DiscountsListParameterCurrency:
      type: string
      enum:
        - AFN
        - ALL
        - DZD
        - AOA
        - ARS
        - AMD
        - AWG
        - AUD
        - AZN
        - BSD
        - BDT
        - BBD
        - BZD
        - BMD
        - BOB
        - BAM
        - BWP
        - BRL
        - BHD
        - GBP
        - BND
        - BGN
        - BIF
        - BYN
        - KHR
        - CAD
        - CVE
        - KYD
        - KWD
        - XAF
        - XPF
        - CLP
        - CNY
        - COP
        - KMF
        - CDF
        - CRC
        - HRK
        - CZK
        - DKK
        - DJF
        - DOP
        - XCD
        - EGP
        - ETB
        - EUR
        - FKP
        - FJD
        - GMD
        - GEL
        - GIP
        - GTQ
        - GNF
        - GYD
        - HTG
        - HNL
        - HKD
        - HUF
        - ISK
        - INR
        - IDR
        - ILS
        - JMD
        - JPY
        - JOD
        - KZT
        - KES
        - KGS
        - LAK
        - LBP
        - LSL
        - LRD
        - MOP
        - MKD
        - MGA
        - MWK
        - MYR
        - MVR
        - MRO
        - MUR
        - MXN
        - MDL
        - MNT
        - MAD
        - MZN
        - MMK
        - NAD
        - NPR
        - ANG
        - TWD
        - NZD
        - NIO
        - NGN
        - NOK
        - OMR
        - PKR
        - PAB
        - PGK
        - PYG
        - PEN
        - PHP
        - PLN
        - QAR
        - RON
        - RUB
        - RWF
        - SHP
        - SVC
        - WST
        - STD
        - SAR
        - RSD
        - SCR
        - SLL
        - SGD
        - SBD
        - SOS
        - ZAR
        - KRW
        - LKR
        - SRD
        - SZL
        - SEK
        - CHF
        - TJS
        - TZS
        - THB
        - TND
        - TOP
        - TTD
        - TRY
        - UGX
        - UAH
        - AED
        - UYU
        - USD
        - UZS
        - VUV
        - VEF
        - VND
        - XOF
        - YER
        - ZMW
        - SLE
        - XCG
        - SSP
        - VES
        - MRU
        - STN
        - VED
    GetV0DiscountsListParameterValidFrom:
      type:
        - integer
        - 'null'
      format: int64
      minimum: 0
      maximum: 9007199254740991
    GetV0DiscountsListParameterValidUntil:
      type:
        - integer
        - 'null'
      format: int64
      minimum: 0
      maximum: 9007199254740991
    GetV0DiscountsListParameterOrderBy:
      type: string
      enum:
        - createdAt
        - name
        - amount
    GetV0DiscountsListParameterOrderDirection:
      type: string
      enum:
        - ASC
        - DESC
    GetV0DiscountsListParameterSkip:
      type:
        - number
        - 'null'
      format: double
      minimum: 0
      maximum: 1.7976931348623157e+308
    GetV0DiscountsListParameterTake:
      type:
        - number
        - 'null'
      format: double
      minimum: 0
      maximum: 1.7976931348623157e+308
    GetV0DiscountsListParameterArchived:
      oneOf:
        - type: string
        - type: boolean
    GetV0DiscountsListParameterExpired:
      oneOf:
        - type: string
        - type: boolean
    GetV0DiscountsListParameterWithArchived:
      oneOf:
        - type: string
        - type: boolean
    GetV0DiscountsListParameterReturnCount:
      oneOf:
        - type: string
        - type: boolean
    GetV0DiscountsListPositiveResponse:
      type: object
      properties:
        status:
          type: string
          const: success
        data:
          type: object
          properties:
            discounts:
              type: array
              items:
                type: object
                properties:
                  object:
                    type: string
                    enum:
                      - discount
                    default: discount
                  id:
                    type: string
                    format: uuid
                  type:
                    type: string
                    enum:
                      - code
                      - sale
                  name:
                    type:
                      - string
                      - 'null'
                    default: null
                  amount:
                    oneOf:
                      - type: string
                      - type: number
                        format: double
                        minimum: -1.7976931348623157e+308
                        maximum: 1.7976931348623157e+308
                  amountType:
                    type: string
                    enum:
                      - fixed
                      - percentage
                  discountCode:
                    type:
                      - string
                      - 'null'
                    default: null
                  validFrom:
                    type:
                      - integer
                      - 'null'
                    format: int64
                    minimum: 0
                    maximum: 9007199254740991
                    default: null
                  validUntil:
                    type:
                      - integer
                      - 'null'
                    format: int64
                    minimum: 0
                    maximum: 9007199254740991
                    default: null
                  purchaseLimit:
                    type:
                      - integer
                      - 'null'
                    format: int64
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    default: null
                  timesUsed:
                    type: integer
                    format: int64
                    minimum: -9007199254740991
                    maximum: 9007199254740991
                    default: 0
                  status:
                    type: string
                    enum:
                      - active
                      - inactive
                  includesAllOffers:
                    type: boolean
                    default: false
                  excludedOffers:
                    type: array
                    items:
                      type: string
                  currency:
                    type: string
                    enum:
                      - AFN
                      - ALL
                      - DZD
                      - AOA
                      - ARS
                      - AMD
                      - AWG
                      - AUD
                      - AZN
                      - BSD
                      - BDT
                      - BBD
                      - BZD
                      - BMD
                      - BOB
                      - BAM
                      - BWP
                      - BRL
                      - BHD
                      - GBP
                      - BND
                      - BGN
                      - BIF
                      - BYN
                      - KHR
                      - CAD
                      - CVE
                      - KYD
                      - KWD
                      - XAF
                      - XPF
                      - CLP
                      - CNY
                      - COP
                      - KMF
                      - CDF
                      - CRC
                      - HRK
                      - CZK
                      - DKK
                      - DJF
                      - DOP
                      - XCD
                      - EGP
                      - ETB
                      - EUR
                      - FKP
                      - FJD
                      - GMD
                      - GEL
                      - GIP
                      - GTQ
                      - GNF
                      - GYD
                      - HTG
                      - HNL
                      - HKD
                      - HUF
                      - ISK
                      - INR
                      - IDR
                      - ILS
                      - JMD
                      - JPY
                      - JOD
                      - KZT
                      - KES
                      - KGS
                      - LAK
                      - LBP
                      - LSL
                      - LRD
                      - MOP
                      - MKD
                      - MGA
                      - MWK
                      - MYR
                      - MVR
                      - MRO
                      - MUR
                      - MXN
                      - MDL
                      - MNT
                      - MAD
                      - MZN
                      - MMK
                      - NAD
                      - NPR
                      - ANG
                      - TWD
                      - NZD
                      - NIO
                      - NGN
                      - NOK
                      - OMR
                      - PKR
                      - PAB
                      - PGK
                      - PYG
                      - PEN
                      - PHP
                      - PLN
                      - QAR
                      - RON
                      - RUB
                      - RWF
                      - SHP
                      - SVC
                      - WST
                      - STD
                      - SAR
                      - RSD
                      - SCR
                      - SLL
                      - SGD
                      - SBD
                      - SOS
                      - ZAR
                      - KRW
                      - LKR
                      - SRD
                      - SZL
                      - SEK
                      - CHF
                      - TJS
                      - TZS
                      - THB
                      - TND
                      - TOP
                      - TTD
                      - TRY
                      - UGX
                      - UAH
                      - AED
                      - UYU
                      - USD
                      - UZS
                      - VUV
                      - VEF
                      - VND
                      - XOF
                      - YER
                      - ZMW
                      - SLE
                      - XCG
                      - SSP
                      - VES
                      - MRU
                      - STN
                      - VED
                required:
                  - id
                  - type
                  - amount
                  - amountType
                  - status
                  - excludedOffers
                  - currency
            count:
              type:
                - number
                - 'null'
              format: double
              minimum: -1.7976931348623157e+308
              maximum: 1.7976931348623157e+308
          required:
            - discounts
            - count
      required:
        - status
        - data
    GetV0DiscountsListNegativeResponse:
      type: object
      properties:
        status:
          type: string
          const: error
        error:
          type: object
          properties:
            message:
              type: string
          required:
            - message
      required:
        - status
        - error
  securitySchemes:
    APIKEY_1:
      type: apiKey
      in: header
      name: x-fngs-public-key

````