> ## 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.

# Get a discount code

> Get one discount code with its status, the number of completed redemptions and the forms it is enabled on.

> [!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/{id}
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/{id}:
    get:
      tags:
        - Discount Codes
      summary: Get a discount code
      description: >-
        Get one discount code with its status, the number of completed
        redemptions and the forms it is enabled on.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/DiscountCodeId'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/discount_code_response'
              example:
                discount_code:
                  id: 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11
                  code: SUMMER
                  value: '10.0'
                  kind: percentage
                  currency: null
                  expires_at: null
                  redeems_limit: null
                  created_at: '2026-10-01T09:00:00.000Z'
                  updated_at: '2026-10-01T09:00:00.000Z'
                  redeems_count: 12
                  status: active
                  forms:
                    - id: c3b0a8d2-5e44-4f4e-8a35-0d2f5a1b7c90
                      title: Workshop signup
        '404':
          $ref: '#/components/responses/NotFound'
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
    DiscountCodeId:
      in: path
      name: id
      description: >-
        Id of the discount code. You can get it by using the [List discount
        codes](/api/discount-codes/list) API.
      required: true
      schema:
        type: string
        example: 6f1c2a7e-2b1d-4a51-9a0e-1f8f3b0c9d11
  schemas:
    discount_code_response:
      type: object
      properties:
        discount_code:
          $ref: '#/components/schemas/discount_code_with_forms'
    discount_code_with_forms:
      allOf:
        - $ref: '#/components/schemas/discount_code'
        - type: object
          properties:
            forms:
              type: array
              description: Forms that the code is enabled on.
              items:
                type: object
                properties:
                  id:
                    type: string
                    example: c3b0a8d2-5e44-4f4e-8a35-0d2f5a1b7c90
                  title:
                    type: string
                    example: Workshop signup
    error_response:
      type: object
      properties:
        error:
          type: string
    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
    date_time_field:
      type: string
      format: date-time
  responses:
    NotFound:
      description: Not Found - Discount code with the given ID does not exist
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error_response'
          example:
            error: DiscountCode does not exist.

````

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