HighLevel Coupons API

Documentation for payments API

Business capability
Discount & Promotion Management BC-440.30

Operations 5

GET /payments/coupon/list List Coupons #
POST /payments/coupon Create Coupon #
PUT /payments/coupon Update Coupon #
DELETE /payments/coupon Delete Coupon #
GET /payments/coupon Fetch Coupon #

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-campaign-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-upsert-ad-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-upsert-segment-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-lead-form-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-upsert-conversion-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-upsert-adset-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-estimate-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-estimate-template-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-invoice-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-estimate-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-text2-pay-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-estimates-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-post-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-post-create-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-search-post-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-set-accounts-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-bulk-delete-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-by-location-id-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-calendar-create-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-calendar-update-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-appointment-create-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-appointment-edit-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-calendar-notifications-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-calendar-notification-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-product-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-price-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-price-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-product-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-product-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-product-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-subscription-response-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-txn-response-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-order-response-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-coupon-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-connect-custom-providers-response-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-custom-providers-response-schema-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-available-shipping-rates-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-shipping-rate-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-shipping-rate-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-shipping-carrier-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-shipping-carrier-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-store-setting-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-send-message-body-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-message-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-process-message-body-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-email-message-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-get-conversation-by-id-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-user-subscription-change-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-location-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-location-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-location-successful-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-recurring-task-create-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-custom-fields-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-recurring-task-update-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-upsert-contact-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-create-contact-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-contact-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-tags-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-update-tags-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/highlevel/refs/heads/main/json-schema/highlevel-contacts-business-update-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/highlevel:highlevel-coupons-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

highlevel-coupons-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Payments Coupons API
  description: Documentation for payments API
  version: '1.0'
  contact: {}
servers:
- url: https://services.leadconnectorhq.com
tags:
- name: Coupons
  description: Documentation for payments API
paths:
  /payments/coupon/list:
    get:
      operationId: list-coupons
      summary: List Coupons
      description: The "List Coupons" API allows you to retrieve a list of all coupons available in your location. Use this endpoint to view all promotional offers and special discounts for your customers.
      parameters:
      - name: Version
        in: header
        description: API Version
        required: true
        schema:
          type: string
          enum:
          - '2021-07-28'
      - name: altId
        required: true
        in: query
        description: Location Id
        schema:
          example: BQdAwxa0ky1iK2sstLGJ
          type: string
      - name: altType
        required: true
        in: query
        description: Alt Type
        schema:
          example: location
          enum:
          - location
          type: string
      - name: limit
        required: false
        in: query
        description: Maximum number of coupons to return
        schema:
          default: 100
          example: 10
          type: number
      - name: offset
        required: false
        in: query
        description: Number of coupons to skip for pagination
        schema:
          default: 0
          example: 0
          type: number
      - name: status
        required: false
        in: query
        description: Filter coupons by status
        schema:
          example: active
          enum:
          - scheduled
          - active
          - expired
          type: string
      - name: search
        required: false
        in: query
        description: Search term to filter coupons by name or code
        schema:
          example: DEAL50
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCouponsResponseDto'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO
      tags:
      - Coupons
      security:
      - Location-Access:
        - payments/coupons.readonly
  /payments/coupon:
    post:
      operationId: create-coupon
      summary: Create Coupon
      description: The "Create Coupon" API allows you to create a new promotional coupon with customizable parameters such as discount amount, validity period, usage limits, and applicable products. Use this endpoint to set up promotional offers and special discounts for your customers.
      parameters:
      - name: Version
        in: header
        description: API Version
        required: true
        schema:
          type: string
          enum:
          - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCouponParams'
      responses:
        '201':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCouponResponseDto'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO
      tags:
      - Coupons
      security:
      - Location-Access:
        - payments/coupons.write
    put:
      operationId: update-coupon
      summary: Update Coupon
      description: The "Update Coupon" API enables you to modify existing coupon details such as discount values, validity periods, usage limits, and other promotional parameters. Use this endpoint to adjust or extend promotional offers for your customers.
      parameters:
      - name: Version
        in: header
        description: API Version
        required: true
        schema:
          type: string
          enum:
          - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCouponParams'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCouponResponseDto'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO
      tags:
      - Coupons
      security:
      - Location-Access:
        - payments/coupons.write
    delete:
      operationId: delete-coupon
      summary: Delete Coupon
      description: The "Delete Coupon" API allows you to permanently remove a coupon from your system using its unique identifier. Use this endpoint to discontinue promotional offers or clean up unused coupons. Note that this action cannot be undone.
      parameters:
      - name: Version
        in: header
        description: API Version
        required: true
        schema:
          type: string
          enum:
          - '2021-07-28'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeleteCouponParams'
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeleteCouponResponseDto'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO
      tags:
      - Coupons
      security:
      - Location-Access:
        - payments/coupons.write
    get:
      operationId: get-coupon
      summary: Fetch Coupon
      description: The "Get Coupon Details" API enables you to retrieve comprehensive information about a specific coupon using either its unique identifier or promotional code. Use this endpoint to view coupon parameters, usage statistics, validity periods, and other promotional details.
      parameters:
      - name: Version
        in: header
        description: API Version
        required: true
        schema:
          type: string
          enum:
          - '2021-07-28'
      - name: altId
        required: true
        in: query
        description: Location Id
        schema:
          example: BQdAwxa0ky1iK2sstLGJ
          type: string
      - name: altType
        required: true
        in: query
        description: Alt Type
        schema:
          example: location
          enum:
          - location
          type: string
      - name: id
        required: true
        in: query
        description: Coupon id
        schema:
          example: 6241712be68f7a98102ba272
          type: string
      - name: code
        required: true
        in: query
        description: Coupon code
        schema:
          example: DEAL50
          type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateCouponResponseDto'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: ../common/common-schemas.json#/components/schemas/UnprocessableDTO
      tags:
      - Coupons
      security:
      - Location-Access:
        - payments/coupons.readonly
components:
  schemas:
    CreateCouponParams:
      type: object
      properties:
        altId:
          type: string
          description: Location Id
          example: BQdAwxa0ky1iK2sstLGJ
        altType:
          type: string
          description: Alt Type
          enum:
          - location
          example: location
        name:
          type: string
          description: Coupon Name
          example: New Year Sale
        code:
          type: string
          description: Coupon Code
          example: LEVELUPDAY2022
        discountType:
          type: string
          description: Discount Type
          enum:
          - percentage
          - amount
          example: amount
        discountValue:
          type: number
          description: Discount Value
          example: 10
        startDate:
          type: string
          description: Start date in YYYY-MM-DDTHH:mm:ssZ format
          example: '2023-01-01T22:45:00.000Z'
        endDate:
          type: string
          description: End date in YYYY-MM-DDTHH:mm:ssZ format
          example: '2023-01-31T22:45:00.000Z'
        usageLimit:
          type: number
          description: Max number of times coupon can be used
          example: 10
        productIds:
          description: Product Ids
          example:
          - 6241712be68f7a98102ba272
          type: array
          items:
            type: string
        applyToFuturePayments:
          type: boolean
          example: true
          default: true
          description: Is Coupon applicable on upcoming subscription transactions
        applyToFuturePaymentsConfig:
          example:
          - type: fixed
            duration: 5
            durationType: months
          - type: forever
          default:
            type: forever
          description: If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
          allOf:
          - $ref: '#/components/schemas/ApplyToFuturePaymentsConfig'
        limitPerCustomer:
          type: boolean
          example: true
          default: false
          description: Limits whether a coupon can be redeemed only once per customer.
      required:
      - altId
      - altType
      - name
      - code
      - discountType
      - discountValue
      - startDate
    ListCouponsResponseDto:
      type: object
      properties:
        data:
          description: Array of coupon objects
          type: array
          items:
            $ref: '#/components/schemas/CouponDto'
        totalCount:
          type: number
          description: Total number of coupons matching the query criteria
          example: 20
        traceId:
          type: string
          description: Unique identifier for tracing this API request
          example: c667b18d-8f5e-44cf-a914
      required:
      - data
      - totalCount
      - traceId
    UpdateCouponParams:
      type: object
      properties:
        altId:
          type: string
          description: Location Id
          example: BQdAwxa0ky1iK2sstLGJ
        altType:
          type: string
          description: Alt Type
          enum:
          - location
          example: location
        name:
          type: string
          description: Coupon Name
          example: New Year Sale
        code:
          type: string
          description: Coupon Code
          example: LEVELUPDAY2022
        discountType:
          type: string
          description: Discount Type
          enum:
          - percentage
          - amount
          example: amount
        discountValue:
          type: number
          description: Discount Value
          example: 10
        startDate:
          type: string
          description: Start date in YYYY-MM-DDTHH:mm:ssZ format
          example: '2023-01-01T22:45:00.000Z'
        endDate:
          type: string
          description: End date in YYYY-MM-DDTHH:mm:ssZ format
          example: '2023-01-31T22:45:00.000Z'
        usageLimit:
          type: number
          description: Max number of times coupon can be used
          example: 10
        productIds:
          description: Product Ids
          example:
          - 6241712be68f7a98102ba272
          type: array
          items:
            type: string
        applyToFuturePayments:
          type: boolean
          example: true
          default: true
          description: Is Coupon applicable on upcoming subscription transactions
        applyToFuturePaymentsConfig:
          example:
          - type: fixed
            duration: 5
            durationType: months
          - type: forever
          default:
            type: forever
          description: If coupon is applicable on upcoming subscription transactions, how many months should it be applicable for a subscription
          allOf:
          - $ref: '#/components/schemas/ApplyToFuturePaymentsConfig'
        limitPerCustomer:
          type: boolean
          example: true
          default: false
          description: Limits whether a coupon can be redeemed only once per customer.
        id:
          type: string
          description: Coupon Id
          example: 6241712be68f7a98102ba272
      required:
      - altId
      - altType
      - name
      - code
      - discountType
      - discountValue
      - startDate
      - id
    ApplyToFuturePaymentsConfig:
      type: object
      properties:
        type:
          type: string
          description: Type of the config
          example: forever | fixed
          enum:
          - forever
          - fixed
        duration:
          type: number
          description: Duration the coupon to be applied in a subscription
          example: 5
        durationType:
          type: string
          description: Type of the duration
          example: months
          enum:
          - months
      required:
      - type
      - duration
      - durationType
    CreateCouponResponseDto:
      type: object
      properties:
        _id:
          type: string
          description: Unique MongoDB identifier for the coupon
          example: 67f6c132d9485f9dacd5f123
        usageCount:
          type: number
          description: Number of times the coupon has been used
          example: 12
        limitPerCustomer:
          type: number
          description: Maximum number of times a customer can use this coupon (0 for unlimited)
          example: 5
        altId:
          type: string
          description: Location Id
          example: 79t07PzK8Tvf73d12312
        altType:
          type: string
          description: Type of entity
          example: location
        name:
          type: string
          description: Display name of the coupon
          example: NEWT6
        code:
          type: string
          description: Redemption code for the coupon
          example: NEWT6
        discountType:
          type: string
          description: Type of discount (percentage or amount)
          example: percentage
          enum:
          - percentage
          - amount
        discountValue:
          type: number
          description: Value of the discount (percentage or fixed amount)
          example: 25
        status:
          type: string
          description: Current status of the coupon
          example: scheduled
          enum:
          - scheduled
          - active
          - expired
        startDate:
          type: string
          description: Date when the coupon becomes active
          example: '2025-04-30T18:30:00.000Z'
        endDate:
          type: string
          description: End date when the coupon expires
          example: '2025-05-30T18:30:00.000Z'
        applyToFuturePayments:
          type: boolean
          description: Indicates if the coupon applies to future recurring payments
          example: true
        applyToFuturePaymentsConfig:
          description: Configuration for how the coupon applies to future payments
          allOf:
          - $ref: '#/components/schemas/ApplyToFuturePaymentsConfigDto'
        userId:
          type: string
          description: User ID associated with the coupon (if applicable)
          example: q0m15dTLGeiGOXG123123
        createdAt:
          type: string
          description: Creation timestamp
          example: '2025-04-09T18:49:22.026Z'
        updatedAt:
          type: string
          description: Last update timestamp
          example: '2025-04-09T18:49:22.026Z'
        traceId:
          type: string
          description: Unique identifier for tracing this API request
          example: c667b18d-8f5e-44cf-a914
      required:
      - _id
      - usageCount
      - limitPerCustomer
      - altId
      - altType
      - name
      - code
      - discountType
      - discountValue
      - status
      - startDate
      - applyToFuturePayments
      - applyToFuturePaymentsConfig
      - createdAt
      - updatedAt
      - traceId
    DeleteCouponResponseDto:
      type: object
      properties:
        success:
          type: boolean
          description: Indicates whether the delete was successful
          example: true
        traceId:
          type: string
          description: Unique identifier for tracing this API request
          example: c667b18d-8f5e-44cf-a914
      required:
      - success
      - traceId
    CouponDto:
      type: object
      properties:
        _id:
          type: string
          description: Unique MongoDB identifier for the coupon
          example: 67f6c132d9485f9dacd5f123
        usageCount:
          type: number
          description: Number of times the coupon has been used
          example: 12
        limitPerCustomer:
          type: number
          description: Maximum number of times a customer can use this coupon (0 for unlimited)
          example: 5
        altId:
          type: string
          description: Location Id
          example: 79t07PzK8Tvf73d12312
        altType:
          type: string
          description: Type of entity
          example: location
        name:
          type: string
          description: Display name of the coupon
          example: NEWT6
        code:
          type: string
          description: Redemption code for the coupon
          example: NEWT6
        discountType:
          type: string
          description: Type of discount (percentage or amount)
          example: percentage
          enum:
          - percentage
          - amount
        discountValue:
          type: number
          description: Value of the discount (percentage or fixed amount)
          example: 25
        status:
          type: string
          description: Current status of the coupon
          example: scheduled
          enum:
          - scheduled
          - active
          - expired
        startDate:
          type: string
          description: Date when the coupon becomes active
          example: '2025-04-30T18:30:00.000Z'
        endDate:
          type: string
          description: End date when the coupon expires
          example: '2025-05-30T18:30:00.000Z'
        applyToFuturePayments:
          type: boolean
          description: Indicates if the coupon applies to future recurring payments
          example: true
        applyToFuturePaymentsConfig:
          description: Configuration for how the coupon applies to future payments
          allOf:
          - $ref: '#/components/schemas/ApplyToFuturePaymentsConfigDto'
        userId:
          type: string
          description: User ID associated with the coupon (if applicable)
          example: q0m15dTLGeiGOXG123123
        createdAt:
          type: string
          description: Creation timestamp
          example: '2025-04-09T18:49:22.026Z'
        updatedAt:
          type: string
          description: Last update timestamp
          example: '2025-04-09T18:49:22.026Z'
      required:
      - _id
      - usageCount
      - limitPerCustomer
      - altId
      - altType
      - name
      - code
      - discountType
      - discountValue
      - status
      - startDate
      - applyToFuturePayments
      - applyToFuturePaymentsConfig
      - createdAt
      - updatedAt
    DeleteCouponParams:
      type: object
      properties:
        altId:
          type: string
          description: Location Id
          example: BQdAwxa0ky1iK2sstLGJ
        altType:
          type: string
          description: Alt Type
          enum:
          - location
          example: location
        id:
          type: string
          description: Coupon Id
          example: 6241712be68f7a98102ba272
      required:
      - altId
      - altType
      - id
    ApplyToFuturePaymentsConfigDto:
      type: object
      properties:
        type:
          type: string
          description: Type of future payments configuration
          example: fixed
          enum:
          - forever
          - fixed
        duration:
          type: number
          description: Duration value for fixed type configurations
          example: 3
        durationType:
          type: string
          description: Duration type for fixed configurations (e.g. months)
          example: months
      required:
      - type
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      in: header
      description: Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
      type: http
    Location-Access:
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      in: header
      description: Use the Access Token generated with user type as Sub-Account (OR) Private Integration Token of Sub-Account.
      type: http
    Location-Access-Only:
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      in: header
      description: Use the Access Token generated with user type as Sub-Account.
      type: http
    Agency-Access:
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      in: header
      description: Use the Access Token generated with user type as Agency (OR) Private Integration Token of Agency.
      type: http
    Agency-Access-Only:
      scheme: bearer
      bearerFormat: JWT
      name: Authorization
      in: header
      description: Use the Access Token generated with user type as Agency.
      type: http
x-tagGroups:
  name: Payments
  tags:
  - Payments
  - Integrations
  - Orders
  - Order fulfillments
  - Order Notes
  - Transactions
  - Subscriptions
  - Coupons
  - Custom Provider