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

# Validate coupon

> Validate coupon data



## OpenAPI

````yaml /openapi.yaml post /v2/pos/{posSystemId}/coupon/couponCodes/validate
openapi: 3.0.1
info:
  title: ClearLine POS API
  description: >-
    Point of Sale integration API for ClearLine Marketing Platform. This API
    enables POS systems to send transaction data, manage customer interactions,
    and integrate with marketing campaigns.
  version: v1
servers:
  - url: https://public-api-demo.clearline.me
    description: ClearLine API Server
security: []
paths:
  /v2/pos/{posSystemId}/coupon/couponCodes/validate:
    post:
      tags:
        - Coupons (v2)
      summary: Validate coupon
      description: Validate coupon data
      operationId: PosV2Coupon_CouponCodeValidate
      parameters:
        - name: posSystemId
          in: path
          description: POS system identifier
          required: true
          schema:
            type: string
      requestBody:
        description: Request
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          application/json:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          text/json:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          application/*+json:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          application/xml:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          text/xml:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
          application/*+xml:
            schema:
              $ref: '#/components/schemas/PosCouponCodeValidateRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
              rewardProvider: TwoReward
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PosCouponCodeValidateResponseApiResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PosCouponCodeValidateResponseApiResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PosCouponCodeValidateResponseApiResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/PosCouponCodeValidateResponseApiResponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/PosCouponCodeValidateResponseApiResponse'
      security:
        - BearerAuth: []
        - ImplicitAuth: []
components:
  schemas:
    PosCouponCodeValidateRequest:
      required:
        - posLocationId
      type: object
      properties:
        posLocationId:
          minLength: 1
          type: string
          description: The POS location identifier
        code:
          type: string
          description: Coupon code
          nullable: true
        rewardProvider:
          $ref: '#/components/schemas/RewardProvider'
      additionalProperties: false
      description: Request model for validating a coupon code
    PosCouponCodeValidateResponseApiResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PosCouponCodeValidateResponse'
      additionalProperties: false
    RewardProvider:
      enum:
        - TwoReward
        - PJM
        - Dummy
      type: string
    PosCouponCodeValidateResponse:
      type: object
      additionalProperties: false
      description: Response model for validating a coupon code
  securitySchemes:
    BearerAuth:
      type: http
      description: |-

        JWT Authorization header using the Bearer scheme.

        Enter **_JWT Bearer token only_** in the text input below.
      scheme: bearer
      bearerFormat: JWT
    ImplicitAuth:
      type: oauth2
      description: Implicit scheme
      flows:
        implicit:
          authorizationUrl: https://logindemo.clearline.me/connect/authorize
          scopes:
            clearline_api: Grants access to Clearline API endpoints.

````