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

# Create POS Transaction



## OpenAPI

````yaml /openapi.yaml post /pos/{posSystemId}/transaction
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:
  /pos/{posSystemId}/transaction:
    post:
      tags:
        - Transactions
      summary: Create POS Transaction
      operationId: Pos_SendTransaction
      parameters:
        - name: posSystemId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          application/json:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          text/json:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          application/*+json:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          application/xml:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          text/xml:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
          application/*+xml:
            schema:
              $ref: '#/components/schemas/NewPosTransactionRequestDto'
      responses:
        '200':
          description: Success
          content:
            text/plain:
              schema:
                $ref: '#/components/schemas/NewPosTransactionResponseDtoApiResponse'
            application/json:
              schema:
                $ref: '#/components/schemas/NewPosTransactionResponseDtoApiResponse'
            text/json:
              schema:
                $ref: '#/components/schemas/NewPosTransactionResponseDtoApiResponse'
            application/xml:
              schema:
                $ref: '#/components/schemas/NewPosTransactionResponseDtoApiResponse'
            text/xml:
              schema:
                $ref: '#/components/schemas/NewPosTransactionResponseDtoApiResponse'
      security:
        - BearerAuth: []
        - ImplicitAuth: []
components:
  schemas:
    NewPosTransactionRequestDto:
      required:
        - sessionId
        - transactionId
      type: object
      properties:
        sessionId:
          minLength: 1
          type: string
          description: Session identifier
        customer:
          $ref: '#/components/schemas/PosTransactionCustomerDto'
        salesPerson:
          $ref: '#/components/schemas/PosTransactionSalesPersonDto'
        purchaseName:
          type: string
          description: Customer purchase
          nullable: true
        purchaseId:
          type: string
          description: Customer purchase identifier
          nullable: true
        purchaseQuantity:
          type: integer
          description: Customer purchase quantity
          format: int32
        purchasePrice:
          type: string
          description: Customer purchase price
          nullable: true
        transactionId:
          minLength: 1
          type: string
          description: Transaction identifier
        transactionType:
          $ref: '#/components/schemas/PosTransactionTypeDto'
        transactionAmount:
          type: number
          description: Transaction amount
          format: double
          nullable: true
        transactionDate:
          type: string
          description: Transaction date time
          format: date-time
        terminalId:
          type: string
          description: Terminal identifier
          nullable: true
          deprecated: true
        posLocationId:
          type: string
          description: Location POS identifier
          nullable: true
          deprecated: true
        products:
          type: array
          items:
            $ref: '#/components/schemas/PosTransactionProductDto'
          description: Transaction products
          nullable: true
        loyalty:
          $ref: '#/components/schemas/PosTransactionLoyaltyProgramDto'
      additionalProperties: false
      description: New Pos terminal transaction request
    NewPosTransactionResponseDtoApiResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/NewPosTransactionResponseDto'
      additionalProperties: false
    PosTransactionCustomerDto:
      type: object
      properties:
        id:
          type: string
          description: Customer id in external POS system
          nullable: true
        firstName:
          type: string
          description: Customer first name
          nullable: true
        lastName:
          type: string
          description: Customer last name
          nullable: true
        birthDate:
          type: string
          description: Customer birth date
          format: date-time
          nullable: true
        contacts:
          type: array
          items:
            $ref: '#/components/schemas/PosTransactionCustomerContactDto'
          description: Customer contacts
          nullable: true
      additionalProperties: false
      description: POS system transaction customer data
    PosTransactionSalesPersonDto:
      type: object
      properties:
        id:
          type: string
          description: Sales person id in external POS system
          nullable: true
        firstName:
          type: string
          description: Sales person first name
          nullable: true
        lastName:
          type: string
          description: Sales person last name
          nullable: true
      additionalProperties: false
      description: POS system transaction sales person data
    PosTransactionTypeDto:
      enum:
        - Undefined
        - Sale
      type: string
      description: POS transaction types
    PosTransactionProductDto:
      type: object
      properties:
        productId:
          type: string
          description: Product Id
          nullable: true
        productName:
          type: string
          description: Product Name
          nullable: true
        manufacturer:
          type: string
          description: Manufacturer
          nullable: true
        productCategory:
          type: string
          description: Product Category
          nullable: true
        quantity:
          type: integer
          description: Product quantity
          format: int32
      additionalProperties: false
      description: Represents POS transaction products
    PosTransactionLoyaltyProgramDto:
      type: object
      properties:
        cardNumber:
          type: string
          description: '[Optional] LoyaltyCard Number'
          nullable: true
      additionalProperties: false
      description: Transaction LoaltyProgram details
    NewPosTransactionResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Transaction Id
          nullable: true
        qrCodeWidget:
          $ref: '#/components/schemas/WidgetMessageResultDto'
        cfsTemplate:
          $ref: '#/components/schemas/CfsTemplateMessageResultDto'
        posStatus:
          $ref: '#/components/schemas/PosResponseStatus'
        loyalty:
          $ref: '#/components/schemas/PosTransactionLoyaltyResponseDto'
      additionalProperties: false
      description: New Pos terminal transaction response
    PosTransactionCustomerContactDto:
      type: object
      properties:
        email:
          type: string
          description: Customer email
          nullable: true
        phone:
          type: string
          description: Customer phone number
          nullable: true
      additionalProperties: false
      description: POS system transaction customer contacts
    WidgetMessageResultDto:
      type: object
      properties:
        shortLinkUrl:
          type: string
          description: Represent short link url for QR code generation
          nullable: true
        qrCode:
          $ref: '#/components/schemas/QrCodeLinkSetDto'
        notificationMessageId:
          type: string
          description: >-
            Represent an ID to identify the message sent via email or SMS
            channels
          nullable: true
        profile:
          $ref: '#/components/schemas/RecipientProfileGetDto'
        sessionId:
          type: string
          description: Session ID
          nullable: true
      additionalProperties: false
      description: Represent Campaign message response data
    CfsTemplateMessageResultDto:
      type: object
      properties:
        accountTemplateId:
          type: integer
          description: Account template Id
          format: int32
        cfsCarouselUrl:
          type: string
          description: Represent link to the CFS carousel Url
          nullable: true
      additionalProperties: false
      description: Cfs template message result data
    PosResponseStatus:
      enum:
        - Accepted
        - Disabled
        - NotAvailable
      type: string
    PosTransactionLoyaltyResponseDto:
      type: object
      properties:
        status:
          $ref: '#/components/schemas/LoyaltyRewardStatus'
        awardDescription:
          type: string
          description: Award description
          nullable: true
        qrCode:
          $ref: '#/components/schemas/PosTransactionLoyaltyQrCodeResponseDto'
      additionalProperties: false
      description: Transaction Loyalty response data
    QrCodeLinkSetDto:
      type: object
      properties:
        htmlLinkUrl:
          type: string
          description: The url to HTML QR code representation
          nullable: true
        previewHtmlLinkUrl:
          type: string
          description: The url to HTML QR code preview representation
          nullable: true
      additionalProperties: false
      description: Represents QR code link set
    RecipientProfileGetDto:
      type: object
      properties:
        id:
          type: string
          description: Profile id
          nullable: true
        firstName:
          type: string
          description: Profile first name
          nullable: true
        lastName:
          type: string
          description: Profile last name
          nullable: true
        customerEmail:
          type: string
          description: Profile customer email
          nullable: true
        customerPhone:
          type: string
          description: Profile customer phone number
          nullable: true
        salesPerson:
          type: string
          description: Profile sales person
          nullable: true
        purchaseName:
          type: string
          description: Profile purchase
          nullable: true
        purchaseId:
          type: string
          description: Purchase identifier
          nullable: true
        purchaseCategory:
          type: string
          description: Purchase category
          nullable: true
        purchasePrice:
          type: string
          description: Purchase price
          nullable: true
        gender:
          type: string
          description: Profile gender
          nullable: true
      additionalProperties: false
      description: Represent recipient profile
    LoyaltyRewardStatus:
      enum:
        - Applied
        - Disabled
        - NotFound
      type: string
    PosTransactionLoyaltyQrCodeResponseDto:
      type: object
      properties:
        linkUrl:
          type: string
          description: QrCode link url
          nullable: true
        qrCodeLinkUrl:
          type: string
          description: QrCode image url
          nullable: true
        primaryText:
          type: string
          description: Primary text
          nullable: true
        secondaryText:
          type: string
          description: Secondary text
          nullable: true
      additionalProperties: false
      description: Transaction Loyalty QrCode response data
  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.

````