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

# Coupon Data

> Returns details about the coupon currently applied to the user's cart, including type and discount amount or percentage.



## OpenAPI

````yaml POST /cart/getCoupon
openapi: 3.0.0
info:
  title: MineStoreCMS REST API
  description: Documentation for MineStoreCMS Frontend REST API.
  version: 3.8.7
servers:
  - url: https://v3.minestorecms.com/api
    description: Example URL of Demo Server
security: []
tags: []
paths:
  /cart/getCoupon:
    post:
      tags:
        - cart
      summary: Retrieve the current coupon applied to the user's cart
      description: >-
        Returns details about the coupon currently applied to the user's cart,
        including type and discount amount or percentage.
      responses:
        '200':
          description: Successfully retrieved coupon details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    description: Type of the coupon ('percent' or 'amount').
                    enum:
                      - percent
                      - amount
                  percent:
                    type: number
                    format: float
                    description: >-
                      Discount percentage if the coupon is of type 'percent'.
                      Only present if 'type' is 'percent'.
                    example: 10
                  amount:
                    type: number
                    format: float
                    description: >-
                      Discount amount if the coupon is of type 'amount'. Only
                      present if 'type' is 'amount'.
                    example: 5
                  coupon:
                    type: string
                    description: The name of the applied coupon.
                    example: SUMMER2024
        '401':
          description: Unauthorized - Invalid or missing Access Token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    description: Indicates the operation was unsuccessful.
                  message:
                    type: string
                    description: Details about the unauthorized access or error.
        '404':
          description: Not Found - The coupon ID in the cart does not exist.
          content:
            application/json:
              schema:
                type: object
                properties:
                  percent:
                    type: number
                    format: float
                    description: Always 0 if no coupon is found.
                  coupon:
                    type: string
                    description: Always an empty string if no coupon is found.
      deprecated: false
      security:
        - bearerAuth: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````