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

# List Discounts

> List discounts

List discounts


## OpenAPI

````yaml openapi/v1-en.yaml GET /api/v1/discount
openapi: 3.0.3
info:
  title: Subotiz API
  description: Subotiz OpenAPI
  version: 1.0.0
servers:
  - url: https://{api}.subotiz.com
    variables:
      api:
        default: api
security:
  - sec0: []
tags:
  - name: Subscription
    description: Subscription
  - name: Price
    description: Price
  - name: Trade
    description: Trade
  - name: Payment
    description: Payment
  - name: Checkout Session
    description: Checkout Session
  - name: Customer
    description: Customer
  - name: Customer Portal
    description: Customer Portal
paths:
  /api/v1/discount:
    get:
      tags:
        - Discount
      summary: List Discounts
      description: List discounts
      operationId: v1-discount-list-discount
      parameters:
        - name: ids
          in: query
          description: 'Filter by discount IDs. Array size limit: [0,100]'
          schema:
            type: array
            items:
              type: string
        - name: status
          in: query
          description: |-
            Discount status:
             - draft: The discount has been created but is not active or visible to users yet.
             - ongoing: The discount is currently active and available for use.
             - not_started: The discount is defined, but its start time has not yet arrived.
             - completed: The discount has ended and is no longer available for use.
          schema:
            type: string
        - name: discount_codes
          in: query
          description: 'Filter by discount codes. Array size limit: [0,100]'
          schema:
            type: array
            items:
              type: string
        - name: starting_after
          in: query
          description: >-
            Cursor for pagination. starting_after is the object ID that defines
            your position in the list. For example, if you want to get the next
            page, you can use the last object's ID as the parameter value after
            getting the object list for the first time. Cannot be used together
            with ending_before
          schema:
            type: string
        - name: ending_before
          in: query
          description: >-
            Cursor for pagination. ending_before is the object ID that defines
            your position in the list. For example, if you want to get the
            previous page, you can use the first object's ID as the parameter
            value after getting the object list for the first time. Cannot be
            used together with starting_after
          schema:
            type: string
        - name: limit
          in: query
          description: >-
            Pagination parameter, number of items per page, default: 10,
            interface defaults to sorting by creation time in descending order.
            Limit: [1, 100]
          schema:
            type: integer
            format: int32
        - name: created_at.gt
          in: query
          description: >-
            Minimum value to filter by (exclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.gte
          in: query
          description: >-
            Minimum value to filter by (inclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lt
          in: query
          description: >-
            Maximum value to filter by (exclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - name: created_at.lte
          in: query
          description: >-
            Maximum value to filter by (inclusive, UTC time in RFC3339 format,
            such as '2025-01-01T00:00:00Z')
          schema:
            type: string
        - $ref: '#/components/parameters/HeaderRequestID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListDiscountsResponse'
components:
  parameters:
    HeaderRequestID:
      name: Request-Id
      in: header
      description: The unique identifier of the request
      required: true
      schema:
        type: string
        default: 008e3967-a1b5-48bb-be14-d5bff5092e61
  schemas:
    ListDiscountsResponse:
      type: object
      properties:
        code:
          type: string
          description: error code
        message:
          type: string
          description: error message
        data:
          $ref: '#/components/schemas/ListDiscountsResponse_Data'
    ListDiscountsResponse_Data:
      type: object
      properties:
        has_more:
          type: boolean
          description: Whether there is more data
        list:
          type: array
          items:
            $ref: '#/components/schemas/Discount'
          description: Discount list
    Discount:
      type: object
      properties:
        id:
          type: string
          description: The unique ID of the discount object
        discount_name:
          type: string
          description: The name of the discount
        status:
          type: string
          description: |-
            Discount status:
             - draft: The discount has been created but is not active or visible to users yet.
             - not_started: The discount is defined, but its start time has not yet arrived.
             - ongoing: The discount is currently active and available for use.
             - completed: The discount has ended and is no longer available for use.
        discount_code:
          type: string
          description: Discount code to be applied at checkout
        discount_method:
          type: string
          description: >-
            Discount method: Only when set to "discount_code" can a discount
            code be used:
             - discount_code: Discount by discount code
        starts_at:
          type: string
          description: >-
            Discount start time in UTC format, An empty string means no
            restriction
        ends_at:
          type: string
          description: >-
            Discount end time in UTC format, An empty string means no
            restriction
        created_at:
          type: string
          description: Creation time, UTC formatted string
        updated_at:
          type: string
          description: Last update time, UTC formatted string
  securitySchemes:
    sec0:
      type: http
      description: >-
        Bearer API Key authentication. Format: Authorization: Bearer
        {your_api_key}
      scheme: bearer

````