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

# List discount codes

> Business-scoped discount-code list ordered by discount-code ID descending. Supports code search plus `applied_to` and enabled-status filters. Results use v3 cursor pagination.



## OpenAPI

````yaml https://api-openapi.scalev.com/specs/v3/openapi.json get /v3/discount-codes
openapi: 3.0.3
info:
  title: Nexus Commerce API
  version: 3.0.0
  description: >
    Public v3 commerce contract for storefront, customer, and authenticated
    business

    commerce flows.


    This specification intentionally documents only the `/v3` namespace.

    Store-derived public storefront routes under
    `/v3/stores/{store_id}/public/*` require `X-Scalev-Storefront-Api-Key`.

    HTML Mode public page runtime routes under `/v3/pages/{page_unique_id}/*`
    require `X-Scalev-Page-Api-Key` and do not accept storefront public API
    keys.

    Storefront API requests made with `X-Scalev-Storefront-Api-Key`, page
    runtime requests made with `X-Scalev-Page-Api-Key`, and guest-cart requests
    made with `X-Scalev-Guest-Token` are browser client requests and use the
    direct client/IP rate limiter. Machine-authenticated business requests are
    rate-limited per API key or OAuth installation. Rate-limit metadata is
    returned in `X-Ratelimit-*` headers, and `429` responses may be plain text.
  license:
    name: Proprietary
servers:
  - url: https://api.scalev.com
    description: Production
security: []
tags:
  - name: Orders
    description: Authenticated business order management endpoints.
  - name: Storefront
    description: >-
      Public storefront catalog, guest cart, and guest checkout flows. All
      store-derived public storefront routes require
      `X-Scalev-Storefront-Api-Key`.
  - name: HTML Mode Pages
    description: >-
      Public HTML Mode runtime endpoints. These routes require
      `X-Scalev-Page-Api-Key` for the path page and reject storefront public API
      keys.
  - name: OAuth
    description: >-
      Public and machine OAuth token-management endpoints. The authorization
      code flow accepts the standard `scope` parameter; public OAuth clients may
      use PKCE with `token_endpoint_auth_method=none`, and metadata document
      clients may use `private_key_jwt`.
  - name: Identity
    description: Authenticated business identity context.
  - name: Business Users
    description: Authenticated business-user membership self-service endpoints.
  - name: Landing Pages
    description: >-
      Authenticated business landing page endpoints. The documented payloads
      focus on HTML Mode pages.
    externalDocs:
      description: >-
        Read the Landing Pages API guide before creating or publishing HTML Mode
        pages.
      url: https://docs.scalev.com/en/landing-pages-api
  - name: Analytics Setup
    description: >-
      Authenticated business analytics provider catalogs and pixel/container
      endpoints used when configuring landing page displays.
  - name: OAuth Billing
    description: OAuth billing runtime, refund, and developer finance endpoints.
  - name: Customer Auth
    description: Public customer authentication and password-reset endpoints.
  - name: Customer Account
    description: Authenticated customer profile endpoints.
  - name: Customer Cart
    description: Authenticated customer cart management endpoints.
  - name: Customer Checkout
    description: Authenticated customer checkout preparation and confirmation endpoints.
  - name: Customer Orders
    description: Authenticated customer order read endpoints.
  - name: Customer Subscriptions
    description: Authenticated customer subscription and subscription-item endpoints.
  - name: Customer Courses
    description: Authenticated customer digital course access and progress endpoints.
  - name: Discounts
    description: Discount-code validation and authenticated management endpoints.
  - name: Locations
    description: Authenticated business location lookup endpoints.
  - name: Business Stores
    description: >-
      Authenticated business store lookup endpoints. These routes use direct
      numeric Scalev store database IDs.
  - name: Storefront Setup
    description: >-
      Authenticated business setup endpoints for public storefront keys and CORS
      origins.
  - name: Shipping
    description: Authenticated business shipping lookup endpoints.
  - name: Business Products
    description: >-
      Authenticated business product, variant, taxonomy, and course management
      endpoints.
  - name: Business Bundles
    description: >-
      Authenticated business bundle, bundle-price-option, and related
      bundle-management endpoints.
  - name: Business Customers
    description: Authenticated business customer and customer-address management endpoints.
  - name: WABA
    description: >-
      Authenticated WhatsApp Business Account operations and related WABA
      resources.
  - name: WhatsApp Integrations
    description: Authenticated WhatsApp integration management endpoints.
paths:
  /v3/discount-codes:
    get:
      tags:
        - Discounts
      summary: List discount codes
      description: >-
        Business-scoped discount-code list ordered by discount-code ID
        descending. Supports code search plus `applied_to` and enabled-status
        filters. Results use v3 cursor pagination.
      operationId: listDiscountCodes
      parameters:
        - $ref: '#/components/parameters/PageSize'
        - $ref: '#/components/parameters/NextCursor'
        - $ref: '#/components/parameters/PreviousCursor'
        - name: search
          in: query
          required: false
          schema:
            type: string
          description: Case-insensitive partial match against the discount code.
        - name: applied_to
          in: query
          required: false
          schema:
            type: string
            enum:
              - product_price
              - shipping_cost
          description: Filter by the value the discount applies to.
        - name: status
          in: query
          required: false
          schema:
            type: string
            enum:
              - enabled
              - disabled
          description: Filter by whether customers can use the discount code.
      responses:
        '200':
          $ref: '#/components/responses/DiscountCodeCollectionResponse'
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '403':
          $ref: '#/components/responses/ForbiddenResponse'
      security:
        - bearerAuth: []
        - apiKeyAuth: []
        - scalevOAuth:
            - discount_code:list
components:
  parameters:
    PageSize:
      name: page_size
      in: query
      required: false
      schema:
        type: integer
        minimum: 1
      description: Cursor page size.
    NextCursor:
      name: next_cursor
      in: query
      required: false
      schema:
        type: string
      description: Opaque cursor for the next page.
    PreviousCursor:
      name: previous_cursor
      in: query
      required: false
      schema:
        type: string
      description: Opaque cursor for the previous page.
  responses:
    DiscountCodeCollectionResponse:
      description: Paginated discount-code list
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/DiscountCodeCollectionResponseBody'
    BadRequestResponse:
      description: Bad Request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
    ForbiddenResponse:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
  schemas:
    DiscountCodeCollectionResponseBody:
      type: object
      required:
        - data
        - is_paginated
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/DiscountCode'
        is_paginated:
          type: boolean
          enum:
            - true
        has_next:
          type: boolean
        has_previous:
          type: boolean
        next_cursor:
          type: string
          nullable: true
        previous_cursor:
          type: string
          nullable: true
        page_size:
          type: integer
      additionalProperties: false
    ApiErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/FlexibleValue'
        error_code:
          type: string
        message:
          type: string
          description: Error-only human-readable detail.
        errors:
          $ref: '#/components/schemas/FlexibleValue'
      additionalProperties: false
    DiscountCode:
      allOf:
        - $ref: '#/components/schemas/StorefrontDiscountCode'
      description: Business-scoped discount code.
    FlexibleValue:
      oneOf:
        - $ref: '#/components/schemas/FlexibleObject'
        - type: array
          items: {}
        - type: string
        - type: number
        - type: boolean
    StorefrontDiscountCode:
      type: object
      properties:
        id:
          type: integer
        business_id:
          type: integer
        is_enabled:
          type: boolean
        code:
          type: string
        applied_to:
          type: string
          nullable: true
        amount_type:
          type: string
          nullable: true
        percentage:
          $ref: '#/components/schemas/StorefrontMoneyValue'
        is_max_amount:
          type: boolean
        max_amount:
          $ref: '#/components/schemas/StorefrontMoneyValue'
        amount:
          $ref: '#/components/schemas/StorefrontMoneyValue'
        is_usage_limit:
          type: boolean
        usage_limit:
          type: integer
          nullable: true
        current_usage:
          type: integer
          nullable: true
        is_expiry:
          type: boolean
        expiry_time:
          type: string
          format: date-time
          nullable: true
        is_limited_to_pages:
          type: boolean
        pages:
          type: array
          items:
            type: object
            additionalProperties: true
        is_limited_to_payment_methods:
          type: boolean
        payment_methods:
          type: array
          items:
            type: string
            description: Customer checkout payment method code.
        is_minimum_revenue:
          type: boolean
        minimum_revenue:
          $ref: '#/components/schemas/StorefrontMoneyValue'
        inserted_at:
          type: string
          format: date-time
          nullable: true
        updated_at:
          type: string
          format: date-time
          nullable: true
      additionalProperties: true
    FlexibleObject:
      type: object
      additionalProperties: true
    StorefrontMoneyValue:
      oneOf:
        - type: string
          nullable: true
        - type: number
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: authorization
      description: >-
        Send `Authorization: Bearer <api_key>` for machine-authenticated
        business requests. API keys are rate-limited per key.
    scalevOAuth:
      type: oauth2
      description: >-
        OAuth access tokens are rate-limited per OAuth application and merchant
        installation.
      flows:
        authorizationCode:
          authorizationUrl: https://api.scalev.com/v3/oauth/authorize
          tokenUrl: https://api.scalev.com/v3/oauth/token
          scopes:
            order:list: List Orders.
            order:read: View Orders.
            order:statistics:list: List Order Statistics.
            order:create: Create New Orders.
            order:update: Update Orders.
            order:delete: Delete Orders.
            order:change_status: Change Order Status.
            order:create_awb: Request for Order Pickup.
            product:list: List Products.
            product:read: View Products.
            product:create: Create New Products.
            product:update: Update Products.
            product:delete: Delete Products.
            store:list: List Stores.
            store:read: View Stores.
            store:update: Update Stores.
            fb_pixel:list: List Facebook Pixels.
            fb_pixel:read: View Facebook Pixels.
            fb_pixel:create: Create Facebook Pixels.
            fb_pixel:update: Update Facebook Pixels.
            fb_pixel:delete: Delete Facebook Pixels.
            tiktok_pixel:list: List TikTok Pixels.
            tiktok_pixel:read: View TikTok Pixels.
            tiktok_pixel:create: Create TikTok Pixels.
            tiktok_pixel:update: Update TikTok Pixels.
            tiktok_pixel:delete: Delete TikTok Pixels.
            kwai_pixel:list: List Kwai Pixels.
            kwai_pixel:read: View Kwai Pixels.
            kwai_pixel:create: Create Kwai Pixels.
            kwai_pixel:update: Update Kwai Pixels.
            kwai_pixel:delete: Delete Kwai Pixels.
            gtm:list: List GTM Containers.
            gtm:read: View GTM Containers.
            gtm:create: Create GTM Containers.
            gtm:update: Update GTM Containers.
            gtm:delete: Delete GTM Containers.
            page:list: List Pages.
            page:read: View Pages.
            page:create: Create Pages.
            page:update: Update Pages.
            page:delete: Delete Pages.
            payment_account:list: List Payment Accounts.
            bundle:list: List Bundles.
            bundle:read: View Bundles.
            bundle:create: Create New Bundles.
            bundle:update: Update Bundles.
            bundle:delete: Delete Bundles.
            customer:list: List Customers.
            customer:read: View Customers.
            customer:create: Create New Customers.
            customer:update: Update Customers.
            waba_account:list: List WhatsApp Business Accounts.
            waba_account:read: View WhatsApp Business Accounts.
            waba_account:create: Create and Connect WhatsApp Business Accounts.
            waba_account:update: Update WhatsApp Business Accounts.
            waba_account:delete: Delete WhatsApp Business Accounts.
            waba_account:operate: Operate WhatsApp conversations and send messages.
            waba_template_message:send: Send WhatsApp Template Messages.
            whats_app_integration:list: List WhatsApp Integrations.
            whats_app_integration:read: View WhatsApp Integrations.
            whats_app_integration:create: Create WhatsApp Integrations.
            whats_app_integration:update: Update WhatsApp Integrations.
            whats_app_integration:delete: Delete WhatsApp Integrations.

````