> ## 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 the report

> Get the totals of the completed redemptions of one discount code. The result is grouped by form. You can limit it to a date range.

> [!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/{discount_code_id}/report
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/{discount_code_id}/report:
    get:
      tags:
        - Discount Codes
      summary: Get the report of a discount code
      description: >-
        Get the totals of the completed redemptions of one discount code. The
        result is grouped by form. You can limit it to a date range.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
        - $ref: '#/components/parameters/DiscountCodeIdInPath'
        - in: query
          name: start_date
          description: First day to include, as a date such as `2026-10-01`.
          required: false
          schema:
            type: string
            example: '2026-10-01'
        - in: query
          name: end_date
          description: Last day to include, as a date such as `2026-10-31`.
          required: false
          schema:
            type: string
            example: '2026-10-31'
      responses:
        '200':
          description: OK - Request succeeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/report_response'
              example:
                report:
                  groups:
                    - form_title: Workshop signup
                      redeems:
                        - id: 0b7e9f62-3c51-4d8a-a2f4-6c1e9d0b5a33
                          redeemed_on: '2026-10-20T14:12:03.000Z'
                          original_amount: '100.0'
                          discount_amount: '10.0'
                          paid_amount: '90.0'
                          currency: usd
                      total_original_amount: '100.0'
                      total_discount_amount: '10.0'
                      total_paid_amount: '90.0'
                      currency: usd
                      has_mixed_currencies: false
                  total_count: 1
                  total_original_amount: '100.0'
                  total_discount_amount: '10.0'
                  total_paid_amount: '90.0'
                  has_mixed_currencies: false
        '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
    DiscountCodeIdInPath:
      in: path
      name: discount_code_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:
    report_response:
      type: object
      properties:
        report:
          type: object
          properties:
            groups:
              type: array
              description: One group for each form.
              items:
                type: object
                properties:
                  form_title:
                    type: string
                    example: Workshop signup
                  redeems:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          example: 0b7e9f62-3c51-4d8a-a2f4-6c1e9d0b5a33
                        redeemed_on:
                          $ref: '#/components/schemas/date_time_field'
                        original_amount:
                          type: string
                          example: '100.0'
                        discount_amount:
                          type: string
                          example: '10.0'
                        paid_amount:
                          type: string
                          example: '90.0'
                        currency:
                          type: string
                          example: usd
                  total_original_amount:
                    type: string
                    example: '100.0'
                  total_discount_amount:
                    type: string
                    example: '10.0'
                  total_paid_amount:
                    type: string
                    example: '90.0'
                  currency:
                    type: string
                    example: usd
                  has_mixed_currencies:
                    type: boolean
                    example: false
            total_count:
              type: integer
              example: 1
            total_original_amount:
              type: string
              example: '100.0'
            total_discount_amount:
              type: string
              example: '10.0'
            total_paid_amount:
              type: string
              example: '90.0'
            has_mixed_currencies:
              type: boolean
              example: false
    date_time_field:
      type: string
      format: date-time
    error_response:
      type: object
      properties:
        error:
          type: string
  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.