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

# List discount codes

> List the discount codes of the workspace, newest first. Each code has its status and the number of completed redemptions. When `page_number` is omitted, all discount codes are returned.

> [!NOTE]
>
> Replace `{your-subdomain}` with your workspace’s subdomain. \
> Learn how to find your subdomain in [Workspace subdomain](https://apidocs.neetoform.com/api/workspace-subdomain.md).


## OpenAPI

````yaml bundled/discount-codes.yaml GET /discount_codes
openapi: 3.0.3
info:
  title: NeetoForm Discount Codes APIs
  version: 2.0.0
servers:
  - description: NeetoForm APIs
    url: https://{your-subdomain}.neetoform.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/api/workspace-subdomain).
security: []
tags:
  - name: Discount Codes
    description: APIs to manage discount codes, see their redemptions and get reports.
paths:
  /discount_codes:
    get:
      tags:
        - Discount Codes
      summary: List discount codes
      description: >-
        List the discount codes of the workspace, newest first. Each code has
        its status and the number of completed redemptions. When `page_number`
        is omitted, all discount codes are returned.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/page_number_all_results_param'
        - $ref: '#/components/parameters/page_size_param'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/discount_code_list_response'
              example:
                discount_codes:
                  - id: 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11
                    code: SUMMER
                    value: '10.0'
                    kind: percentage
                    currency: null
                    expires_at: '2026-12-31T00:00:00.000Z'
                    redeems_limit: 100
                    created_at: '2026-10-01T09:00:00.000Z'
                    updated_at: '2026-10-01T09:00:00.000Z'
                    redeems_count: 12
                    status: active
                pagination:
                  total_records: 1
                  total_pages: 1
                  current_page_number: 1
                  page_size: 30
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/api/authentication) for more information.
      required: true
      schema:
        type: string
        default: your-api-key
    page_number_all_results_param:
      in: query
      name: page_number
      description: >-
        Page of results to retrieve, starting from 1. When omitted, all results
        are returned in one response and `page_size` is ignored.
      required: false
      schema:
        type: integer
    page_size_param:
      in: query
      name: page_size
      description: Number of results per page. Defaults to 30 when omitted.
      required: false
      schema:
        type: integer
  schemas:
    discount_code_list_response:
      allOf:
        - type: object
          properties:
            discount_codes:
              type: array
              items:
                $ref: '#/components/schemas/discount_code'
        - $ref: '#/components/schemas/paginated_response'
    discount_code:
      type: object
      properties:
        id:
          type: string
          example: 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11
        code:
          type: string
          description: The code that people enter. It is stored in upper case.
          example: SUMMER
        value:
          type: string
          description: >-
            Discount value. It is a percentage for `percentage` codes and an
            amount for `fixed` codes.
          example: '10.0'
        kind:
          type: string
          enum:
            - percentage
            - fixed
          example: percentage
        currency:
          type: string
          nullable: true
          description: Currency of a `fixed` code. It is null for `percentage` codes.
          example: null
        expires_at:
          type: string
          format: date-time
          nullable: true
          example: '2026-12-31T00:00:00.000Z'
        redeems_limit:
          type: integer
          nullable: true
          description: >-
            Maximum number of times the code can be used. It is null when there
            is no limit.
          example: 100
        created_at:
          $ref: '#/components/schemas/date_time_field'
        updated_at:
          $ref: '#/components/schemas/date_time_field'
        redeems_count:
          type: integer
          description: Number of completed redemptions.
          example: 12
        status:
          type: string
          enum:
            - active
            - expired
            - exhausted
          example: active
    paginated_response:
      type: object
      properties:
        pagination:
          type: object
          properties:
            total_records:
              type: integer
            total_pages:
              type: integer
            current_page_number:
              type: integer
            page_size:
              type: integer
    date_time_field:
      type: string
      format: date-time

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.