Skip to main content

Overview

The Automated 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. This enables seamless customer engagement during the checkout process.

Check POS Settings

Before starting a transaction, the POS system must check whether marketing transactions are enabled for the specific POS system.
GET https://public-api-test.clearline.me/pos/{posSystem}/settings/{companyPosId}

Headers

NameValueDescription
AuthorizationBearer access_tokenRequest authorization header
Content-Typeapplication/jsonContent type

Path Parameters

Field nameTypeDescription
posSystemstringThe identifier of the POS system (e.g., pax, clover)
companyPosIdstringThe company POS identifier

Response Fields

data
object
POS system configuration settings
If isTransactionsEnabled is false, the POS system should not send any transactions to ClearLine.

Start a New Interaction

Start a new session between the POS system and the marketing platform. This creates a session identifier that will be used to track the transaction flow.
POST https://public-api-test.clearline.me/pos/{posSystem}/startInteraction

Headers

NameValueDescription
AuthorizationBearer access_tokenRequest authorization header
Content-Typeapplication/jsonContent type

Path Parameters

Field nameTypeDescription
posSystemstringThe identifier of the POS system (e.g., pax, clover)

Request Body

Field nameTypeRequiredDescription
posLocationIdstringYesThe identifier of the POS location
terminalIdstringYesThe identifier of the POS terminal

Response Fields

data
object
Session initialization data

Send Transaction Details

Send a completed POS transaction to the marketing platform. This action may trigger the execution of a widget session automatically based on configured POS rules.
POST https://public-api-test.clearline.me/pos/{posSystem}/transaction

Headers

NameValueDescription
AuthorizationBearer access_tokenRequest authorization header
Content-Typeapplication/jsonContent type

Path Parameters

Field nameTypeDescription
posSystemstringThe identifier of the POS system (e.g., pax, clover)

Request Body

Field nameTypeRequiredDescription
posLocationIdstringYesThe identifier of the POS location
transactionIdstringYesUnique transaction identifier
transactionTypestringYesType of transaction (e.g., “Sale”)
transactionAmountstringYesTotal transaction amount
transactionDatestringYesTransaction date and time in ISO 8601 format
terminalIDstringYesThe identifier of the POS terminal
sessionIdstringYesSession ID from the startInteraction call
customerobjectNoCustomer information
productsobject[]NoArray of products in the transaction
loyaltyobjectNoLoyalty program information

Response Fields

data
object
Transaction processing result with triggered marketing actions

Validate Coupon by Transaction

Validate coupons associated with a specific POS transaction within a marketing campaign session. This endpoint confirms coupon usage and records it in the system.
POST https://public-api-test.clearline.me/pos/{posSystem}/coupon/validate/byTransaction

Headers

NameValueDescription
AuthorizationBearer access_tokenRequest authorization header
Content-Typeapplication/jsonContent type

Path Parameters

Field nameTypeDescription
posSystemstringThe identifier of the POS system (e.g., pax, clover)

Request Body

Field nameTypeRequiredDescription
sessionIdstringYesSession identifier from startInteraction call
campaignIdstringYesMarketing campaign identifier
transactionIdstringYesPOS transaction identifier
couponUserobjectYesInformation about the customer using the coupon

Coupon User Object

Field nameTypeRequiredDescription
firstNamestringNoCustomer’s first name
lastNamestringNoCustomer’s last name
genderstringNoCustomer’s gender
phonestringNoCustomer’s phone number
emailstringNoCustomer’s email address

Response Fields

posStatus
string
Overall POS status: Accepted, Disabled, or NotAvailable
data
object
Coupon validation result

Next Steps