Skip to main content

Intro

The Automatic Flow is designed for fully automated POS system integrations where widget sessions are triggered in real time based on transaction events — without the need for manual input from the operator.

Check POS Settings

Before starting a transaction, the POS system must check whether marketing transactions are enabled for the specific posSystem. [GET] /pos/{posSystem}/settings/{companyPosId}

Headers

NameValueDescription
AuthorizationBearer Request authorization header
Content-Typeapplication/jsonContent type

Input parameters

Field nameDescription
posSystemThe identifier of the POS system (e.g., pax, clover)

Response

"data": {
      "settings": {
          "isCheckInMenuEnabled": true,
          "isTransactionsEnabled": true,
          "isPosRulesEnabled": true,
          "isReceiptPromotionEnabled": true,
          "isCouponsEnabled": true,
          "isProductsImportEnabled": true
      }
}

Response parameters

Field nameDescription
data.isCheckInMenuEnabledIdentifies if CheckIn menu is enabled
data.isTransactionsEnabledIdentifies if Transactions are enabled
data.isPosRulesEnabledIdentifies if PosRules are enabled
data.isReceiptPromotionEnabledIdentifies if Receipt Promotion is enabled
data.isCouponsEnabledIdentifies if Coupons are enabled
data.isProductsImportEnabledIdentifies if Products import is enabled
If isTransactionsEnabled is false, the third-party system should not send any transactions to ClearLine.

Start a New Interaction

Start a new session between the POS system and the marketing platform. [POST] /pos/{posSystem}/startInteraction

Headers

NameValueDescription
AuthorizationBearer Request authorization header
Content-Typeapplication/jsonContent type

Input parameters

Field nameDescription
posSystemThe identifier of the POS system (e.g., pax, clover)

Input request

{
  "posLocationId": {posLocationId},
  "terminalId": {terminalId}
}

Response

{
    "data": {
        "sessionId": "f7892b12-e01a-4717-a306-fce8af792b9c",
        "posStatus": "Accepted"
    }
}

Response parameters

Field nameDescription
data.sessionIdIdentifier of the session
data.posStatusPos Status: Accepted, Disabled, NotAvailable

Send Transaction Details

Send a completed POS transaction to the marketing platform. This action may trigger the execution of a widget session automatically. [POST] /pos/{posSystem}/transaction

Headers

NameValueDescription
AuthorizationBearer Request authorization header
Content-Typeapplication/jsonContent type

Input parameters

Field nameDescription
posSystemThe identifier of the POS system (e.g., pax, clover)

Input request

{
    "posLocationId": "{posLocationId}",
    "transactionId": "{transactionId}",
    "transactionType": "Sale",
    "transactionAmount": "19",
    "transactionDate": "2025-07-25T19:51:30.113",
    "terminalID": "{terminalID}",
    "sessionId": "{sessionId}",
    "customer": {
        "id": "",
        "firstName": "test210525p",
        "lastName": "test210525p",
        "birthDate": "1985-05-21T00:00:00",
        "contacts": [
            {
                "email": "test210525p@mail.com",
                "phone": "11111111111"
            }
        ]
    },
    "products": [
        {
            "productId": "10285",
            "productName": "Milk",
            "manufacturer": "Best",
            "productCategory": "Food",
            "quantity": 1
        }
    ],
    "loyalty": {
        "cardNumber": null
    }
}

Response

{
    "data": {
        "id": "6886834645735100017eac4b",
        "qrCodeWidget": {
            "shortLinkUrl": "https://shorttest.clearline.me/RE-klOWT?sessionId=f7232bcc-e01a-4717-a306-fce8af792b9c&cashRegisterId=962",
            "qrCode": {
                "htmlLinkUrl": "https://webtest.clearline.me:443/qrcode/Html?..",
                "previewHtmlLinkUrl": "https://webtest.clearline.me:443/qrcode/Html?.."
            },
            "notificationMessageId": null,
            "profile": {
                "id": "6787d9bf6430560001023385",
                "firstName": "test210525p",
                "lastName": "test210525p",
                "customerEmail": "test210525p@mail.com",
                "customerPhone": "+11111111111",
                "salesPerson": null,
                "purchaseName": null,
                "purchaseId": null,
                "purchaseCategory": null,
                "purchasePrice": null,
                "gender": "False"
            },
            "sessionId": "f7232bcc-e01a-4717-a306-fce8af792b9c"
        },
        "cfsTemplate": {
            "accountTemplateId": 0,
            "cfsCarouselUrl": null
        },
        "posStatus": "Accepted",
        "loyalty": {
            "status": "NotFound",
            "awardDescription": null,
            "qrCode": {
                "linkUrl": "https://shorttest.clearline.me/RT-aTqH0",
                "qrCodeLinkUrl": "https://webtest.clearline.me:443/qrcode/Png..",
                "primaryText": "Join Our Loyalty Program! <br>  Scan the QR Code to register for the Loyalty Program!",
                "secondaryText": "SCAN ME"
            }
        }
    }
}

Validate Coupon by Transaction

This endpoint validates coupons associated with a specific POS transaction within a marketing campaign session [POST] /pos/{posSystem}/coupon/validate/byTransaction

Headers

NameValueDescription
AuthorizationBearer Request authorization header
Content-Typeapplication/jsonContent type

Input parameters

Field nameDescription
posSystemThe identifier of the POS system (e.g., pax, clover)

Input request

{
  "sessionId": "string",
  "campaignId": "string",
  "transactionId": "string",
  "couponUser": {
    "firstName": "string",
    "lastName": "string",
    "gender": "string",
    "phone": "string",
    "email": "string"
  }
}

Response

  "posStatus": "Accepted",
  "data": {
    "externalSessionId": "{externalSessionId}",
    "status": "Accepted",
    "validationDate": "2025-07-23T20:02:40.049Z",
    "errorMessage": ""
  }
}