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

# List coupons

> Retrieve a paginated list of the store's discount coupons. Requires the READ_DISCOUNTS scope.

Returns the store's discount coupons newest first, with optional filtering by active state. The store is bound to your app token server-side — never send a shop id.


## OpenAPI

````yaml GET /coupons
openapi: 3.1.0
info:
  title: Salesive Apps API — Discounts & Blogs
  version: 1.0.0
  description: >-
    Read and manage the store's discount coupons and blog posts from an
    installed third-party app. Every endpoint authenticates with an
    installed-app access token (prefix `app_`) and requires a specific OAuth
    scope. The target store is bound to the token server-side from the
    installation — never send a shop id.
servers:
  - url: https://api.salesive.com/api/v1
    description: Production
security:
  - AppToken: []
paths:
  /coupons:
    get:
      tags:
        - Coupons
      summary: List coupons
      description: >-
        Returns a paginated list of the store's discount coupons, newest first.
        The store is bound to the app token server-side from the installation —
        never send a shop id. Requires the `READ_DISCOUNTS` scope.
      operationId: listCoupons
      parameters:
        - name: page
          in: query
          required: false
          description: 1-based page number.
          schema:
            type: integer
            default: 1
            minimum: 1
        - name: limit
          in: query
          required: false
          description: Items per page. Defaults to 10, capped at 100.
          schema:
            type: integer
            default: 10
            minimum: 1
            maximum: 100
        - name: active
          in: query
          required: false
          description: >-
            Filter by active state. Pass `true` to return only active coupons or
            `false` for inactive ones. Omit to return all.
          schema:
            type: boolean
      responses:
        '200':
          description: Paginated list of coupons.
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/EnvelopeBase'
                  - type: object
                    properties:
                      data:
                        allOf:
                          - $ref: '#/components/schemas/PageMeta'
                          - type: object
                            properties:
                              coupons:
                                type: array
                                items:
                                  $ref: '#/components/schemas/Coupon'
              example:
                status: 200
                success: true
                message: Coupons retrieved
                data:
                  coupons:
                    - _id: 66b1f2a9c4d5e6f7a8b9c0d1
                      code: SUMMER20
                      user: 66a0e1b2c3d4e5f6a7b8c9d0
                      shop: 66a0d1c2b3a4958677564738
                      type: percentage
                      discount: 20
                      usageLimit: 100
                      usageCount: 12
                      usagePerUser: 1
                      minimumOrderAmount: 5000
                      startDate: '2026-06-01T00:00:00.000Z'
                      endDate: '2026-08-31T23:59:59.000Z'
                      active: true
                      createdAt: '2026-05-20T10:15:00.000Z'
                      updatedAt: '2026-06-25T09:00:00.000Z'
                  page: 1
                  pages: 3
                  total: 24
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    EnvelopeBase:
      type: object
      description: >-
        Standard Salesive response envelope. The operation-specific payload is
        carried in `data`.
      required:
        - status
        - success
        - message
      properties:
        status:
          type: integer
          description: HTTP status code, echoed in the body.
        success:
          type: boolean
          description: Whether the request succeeded.
        message:
          type: string
          description: Human-readable result message.
    PageMeta:
      type: object
      description: >-
        Flat pagination metadata returned alongside the items array on list
        responses.
      properties:
        page:
          type: integer
          description: Current page (1-based).
        pages:
          type: integer
          description: Total number of pages.
        total:
          type: integer
          description: Total number of matching items.
    Coupon:
      type: object
      description: A store-scoped discount coupon.
      properties:
        _id:
          type: string
        code:
          type: string
          description: Coupon code, stored uppercase. Unique within the store.
        user:
          type: string
          description: Id of the user who owns the coupon (set server-side).
        shop:
          type: string
          description: The store id (bound server-side).
        type:
          type: string
          enum:
            - fixed
            - percentage
          description: Discount type.
        discount:
          type: number
          description: >-
            Discount amount; a percent value for `percentage`, an amount for
            `fixed`.
        usageLimit:
          type: integer
          description: Maximum total redemptions across all customers.
        usageCount:
          type: integer
          description: Number of times the coupon has been redeemed.
        usagePerUser:
          type: integer
          description: Maximum redemptions per customer.
        minimumOrderAmount:
          type: number
          description: Minimum order subtotal required to apply the coupon.
        startDate:
          type: string
          format: date-time
          description: Date the coupon becomes valid.
        endDate:
          type: string
          format: date-time
          description: Date the coupon expires.
        active:
          type: boolean
          description: Whether the coupon is active.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Envelope:
      allOf:
        - $ref: '#/components/schemas/EnvelopeBase'
        - type: object
          properties:
            data:
              description: Operation-specific payload (object, array, or null).
  responses:
    Unauthorized:
      description: Missing or invalid app access token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 401
            success: false
            message: Authentication required
            data: null
    Forbidden:
      description: The app token is missing the OAuth scope required for this operation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Envelope'
          example:
            status: 403
            success: false
            message: Insufficient scope
            data: null
  securitySchemes:
    AppToken:
      type: http
      scheme: bearer
      description: >-
        Installed-app access token (prefix app_), issued by the OAuth install
        flow. The store is bound to the token server-side — never send a shop
        id.

````