> ## 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.

# Lookup coupons, by code

> Search coupons by code



## OpenAPI

````yaml /openapi.yaml post /v2/pos/{posSystemId}/coupon/couponCodes/lookup
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/lookup:
    post:
      tags:
        - Coupons (v2)
      summary: Lookup coupons, by code
      description: Search coupons by code
      operationId: PosV2Coupon_LookupCouponByCode
      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/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          application/json:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          text/json:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          application/*+json:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          application/xml:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          text/xml:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
          application/*+xml:
            schema:
              $ref: '#/components/schemas/PosCouponsLookupByCodeRequest'
            example:
              posLocationId: 6orMqUyq2Hg3tP
              code: Sl75Ev
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/PosCouponsLookupByCodeResponseApiResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/PosCouponsLookupByCodeResponseApiResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/PosCouponsLookupByCodeResponseApiResponse'
      security:
        - BearerAuth: []
        - ImplicitAuth: []
components:
  schemas:
    PosCouponsLookupByCodeRequest:
      required:
        - posLocationId
      type: object
      properties:
        posLocationId:
          minLength: 1
          type: string
          description: The POS location identifier
        code:
          type: string
          description: Coupon code
          nullable: true
      additionalProperties: false
      description: Request model for looking up coupons
    PosCouponsLookupByCodeResponseApiResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/PosCouponsLookupByCodeResponse'
      additionalProperties: false
    PosCouponsLookupByCodeResponse:
      type: object
      properties:
        couponCodes:
          type: array
          items:
            $ref: '#/components/schemas/CouponCodeDisplayDto'
          description: Coupons list
          nullable: true
      additionalProperties: false
      description: Response model for looking up coupons
    CouponCodeDisplayDto:
      type: object
      properties:
        rewardProvider:
          $ref: '#/components/schemas/RewardProvider'
        code:
          type: string
          description: Code
          nullable: true
        name:
          type: string
          description: Name
          nullable: true
        title:
          type: string
          description: Title
          nullable: true
        pictureUrl:
          type: string
          description: Picture URL
          nullable: true
        availableUntil:
          type: string
          description: Available until date
          format: date-time
          nullable: true
        status:
          $ref: '#/components/schemas/CouponCodeItemStatus'
        info:
          type: array
          items:
            $ref: '#/components/schemas/CouponCodeDisplayInfoDto'
          description: Additional info
          nullable: true
      additionalProperties: false
      description: CouponCode display data
    RewardProvider:
      enum:
        - TwoReward
        - PJM
        - Dummy
      type: string
    CouponCodeItemStatus:
      enum:
        - Issued
        - Redeemed
        - Cancelled
        - Expired
      type: string
    CouponCodeDisplayInfoDto:
      type: object
      properties:
        title:
          type: string
          description: Info section title
          nullable: true
        items:
          type: object
          additionalProperties:
            type: string
            nullable: true
          description: Info section data
          nullable: true
      additionalProperties: false
      description: Coupon info section
  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.

````