Insights

The Insights module performs synchronous analysis of the received data, returning score, status, and insights within a few seconds.

How the Insights Module Works

The Insights module operates synchronously, analyzing the data immediately after receiving a request. This process involves cross-referencing multiple relevant pieces of information to calculate the score, determine the status, and provide the insights of the analysis.

The analysis response is returned within seconds, enabling quick insightss that are integrated into the application's flow, without the need for asynchronous processing or prolonged waiting.


Request Schema

Represents the integration request.

FieldsDescriptionTypeRequired
transactionTransaction informationTransactionYes
transactionValueTransaction value informationTransaction ValueNo
deviceDevice informationDeviceNo
billingBilling informationBillingYes
shippingShipping informationShippingNo
itemsList of transaction itemsItem ArrayNo
paymentsList of payment methodsPayment ArrayNo
airTravelAir travel informationAir TravelNo

Transaction

Represents the transaction data.

FieldsDescriptionTypeRequired
codeUnique transaction codeStringYes
dateTransaction dateDateTimeYes
emailEmail associated with the transactionStringYes
statusTransaction statusIntegerNo
ipAddressCustomer's IP addressStringNo
originTransaction origin: APP, WEBSITE, TELEVENDAS, etc.StringNo
observationAdditional observationsStringNo

Transaction Value

Represents the total value of the transaction.

FieldsDescriptionTypeRequired
totalValueTotal value of the transactionFloatYes

Device

Represents information about the device used in the transaction.

FieldsDescriptionTypeRequired
fingerprintUnique device identifierFingerprintYes

Fingerprint

Represents the identification information of the device used in the transaction.

FieldsDescriptionTypeRequired
sessionIdUnique session identifier of the deviceGuidYes

Billing

Represents billing information.

FieldsDescriptionTypeRequired
typePerson typeIntegerNo
nameCustomer nameStringYes
emailCustomer emailStringNo
genderCustomer genderStringNo
birthdateDate of birthDateTimeNo
documentsDocuments associated with customerDocument ArrayYes
addressBilling addressAddressNo
phonesCustomer's associated phonesPhone ArrayYes

Shipping

Represents shipping information.

FieldsDescriptionTypeRequired
typePerson typeIntegerNo
priceShipping priceFloatYes
nameRecipient's nameStringYes
emailRecipient's emailStringNo
genderRecipient's genderStringNo
birthdateRecipient's date of birthDateTimeNo
clientIdInternal customer identifier (who made the transaction)StringNo
deliveryTypeDelivery typeIntegerYes
deliveryTimeEstimated delivery timeStringNo
documentsDocuments associated with the recipientDocument ArrayNo
addressShipping addressAddressNo
phonesAssociated phonesPhone ArrayNo

Item

Represents a transaction item.

FieldsDescriptionTypeRequired
codeCustomer's internal item codeStringNo
nameItem nameStringNo
descriptionItem descriptionStringNo
categoryIdCustomer's internal item category IDIntegerNo
categoryNameItem category name (see example table in Glossary)StringNo
barCodeItem barcodeStringNo
valueItem valueFloatYes
quantityItem quantityIntegerYes
isGiftIndicates if the item is a giftBooleanNo
sellerNameSeller's nameStringNo
sellerSegmentSeller's segmentStringNo
isMarketPlaceIndicates if it is a marketplaceStringNo
shippingCompanyShipping companyStringNo
sellerDocumentSeller's documentDocumentYes

Payment

Represents a payment method.

FieldsDescriptionTypeRequired
typePayment typeIntegerYes
valuePayment amountFloatYes
currencyCurrency usedIntegerNo
sequentialPayment sequential numberIntegerNo
paymentDatePayment dateDateTimeNo
installmentsNumber of installmentsIntegerNo
payableTypePayment category within the segment: VOUCHER, SUBSCRIPTION, etc.StringNo
interestRateInterest rate applied to the paymentFloatNo
interestValueInterest amount appliedFloatNo
visaCheckoutUserIdVisa Checkout user identifierStringNo
digitalWalletCodeDigital wallet code usedStringNo
voucherOrderOriginVoucher order originStringNo
subAcquirerSub-acquirer responsible for the paymentStringNo
bankAuthenticationBank authentication informationStringNo
cardCredit card informationCardYes

Card

Represents credit card information.

FieldsDescriptionTypeRequired
ownerNameCardholder's nameStringYes
numberCard numberStringNo
hashCard number hashStringNo
binCard BIN (Bank Identification Number)StringYes
endLast digits of the cardStringYes
typeCard typeIntegerNo
expirationDateCard expiration dateStringNo
documentDocument associated with the cardDocumentNo

Document

Represents a document associated with an entity.

FieldsDescriptionTypeRequired
typeDocument typeIntegerYes
numberDocument numberStringYes
documentTypeCustomerCustomer type associated with documentStringNo
authorityDocument issuing authorityStringNo
authorityStateIssuing authority stateStringNo
issueDateDocument issue dateStringNo

Address

Represents an address.

FieldsDescriptionTypeRequired
typeAddress typeStringYes
addressIdAddress identifierStringNo
streetStreet nameStringYes
numberAddress numberStringYes
districtDistrictStringNo
cityCityStringYes
stateStateStringYes
zipcodePostal code (00000-000)StringYes
countryCountryStringYes
additionalInformationAdditional informationStringNo
referenceAddress referenceStringNo
latitudeAddress latitudeStringNo
longitudeAddress longitudeStringNo

Phone

Represents the information of a phone associated with an entity.

FieldsDescriptionTypeRequired
typePhone typeIntegerNo
countryCodeCountry codeStringNo
areaCodeArea codeStringYes
numberPhone numberStringYes
extensionPhone extensionStringNo

AirTravel

Represents air travel information

FieldsDescriptionTypeRequired
passengersList of air travel passengersPassenger ArrayYes
connectionsList of itinerary connections/segmentsConnection ArrayYes

Passenger

Represents passenger information

FieldsDescriptionTypeRequired
namePassenger nameStringYes
documentTypeDocument typeIntegerYes
documentNumberDocument numberStringYes
companyMileCardCompany mileage cardStringNo
MileCardPersonal mileage cardStringNo
genderPassenger genderStringNo
birthDateDate of birthDateTimeNo
cpfPassenger CPFStringNo

Connection

Represents connection information

FieldDescriptionTypeRequired
companyAirline companyStringNo
flightNumberFlight numberIntegerNo
dateFlight dateDateTimeYes
seatClassSeat classStringNo
originOrigin airportStringYes
destinationDestination airportStringYes
boardingBoarding date/timeDateTimeYes
arrivingArrival date/timeDateTimeYes
fareClassFare classStringNo

Exemplo Request

POST https://homologapix.clearsale.com.br/connect/v1/Integration/{{integrationId}}
Accept: application/json
Content-Type: application/json

{
  "transaction": {
    "code": "string",
    "date": "2025-09-25T15:42:34.935Z",
    "email": "string",
    "status": 0,
    "ipAddress": "string",
    "origin": "string",
    "observation": "string"
  },
  "transactionValue": {
    "totalValue": 0
  },
  "device": {
    "fingerprint": {
      "sessionId": "string"
    }
  },
  "billing": {
    "type": 0,
    "name": "string",
    "email": "string",
    "gender": "string",
    "birthdate": "2025-09-25T15:42:34.935Z",
    "documents": [
      {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    ],
    "address": {
      "type": "string",
      "addressId": "string",
      "street": "string",
      "number": "string",
      "district": "string",
      "city": "string",
      "state": "string",
      "zipcode": "string",
      "country": "string",
      "additionalInformation": "string",
      "reference": "string",
      "latitude": "string",
      "longitude": "string"
    },
    "phones": [
      {
        "type": 0,
        "countryCode": "string",
        "areaCode": "string",
        "number": "string",
        "extension": "string"
      }
    ]
  },
  "shipping": {
    "type": 0,
    "price": 0,
    "name": "string",
    "email": "string",
    "gender": "string",
    "birthdate": "2025-09-25T15:42:34.935Z",
    "clientId": "string",
    "deliveryType": 0,
    "deliveryTime": "string",
    "documents": [
      {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    ],
    "address": {
      "type": "string",
      "addressId": "string",
      "street": "string",
      "number": "string",
      "district": "string",
      "city": "string",
      "state": "string",
      "zipcode": "string",
      "country": "string",
      "additionalInformation": "string",
      "reference": "string",
      "latitude": "string",
      "longitude": "string"
    },
    "phones": [
      {
        "type": 0,
        "countryCode": "string",
        "areaCode": "string",
        "number": "string",
        "extension": "string"
      }
    ]
  },
  "items": [
    {
      "code": "string",
      "name": "string",
      "description": "string",
      "categoryId": 0,
      "categoryName": "string",
      "barCode": "string",
      "value": 0,
      "quantity": 0,
      "isGift": true,
      "sellerName": "string",
      "sellerSegment": "string",
      "isMarketPlace": "string",
      "shippingCompany": "string",
      "sellerDocument": {
        "type": 0,
        "number": "string",
        "documentTypeCustomer": "string",
        "authority": "string",
        "authorityState": "string",
        "issueDate": "string"
      }
    }
  ],
  "payments": [
    {
      "type": 0,
      "value": 0,
      "currency": 0,
      "sequential": 0,
      "paymentDate": "2025-09-25T15:42:34.935Z",
      "installments": 0,
      "payableType": "string",
      "interestRate": 0,
      "interestValue": 0,
      "visaCheckoutUserId": "string",
      "digitalWalletCode": "string",
      "voucherOrderOrigin": "string",
      "subAcquirer": "string",
      "bankAuthentication": "string",
      "card": {
        "ownerName": "string",
        "number": "string",
        "hash": "string",
        "bin": "string",
        "end": "string",
        "type": 0,
        "expirationDate": "string",
        "document": {
          "type": 0,
          "number": "string",
          "documentTypeCustomer": "string",
          "authority": "string",
          "authorityState": "string",
          "issueDate": "string"
        }
      }
    }
  ],
  "airTravel": {
    "passengers": [
      {
        "name": "string",
        "documentType": 0,
        "documentNumber": "string",
        "companyMileCard": "string",
        "mileCard": "string",
        "gender": "string",
        "birthDate": "2025-09-25T15:42:34.935Z",
        "cpf": "string"
      }
    ],
    "connections": [
      {
        "company": "string",
        "flightNumber": 0,
        "date": "2025-09-25T15:42:34.935Z",
        "seatClass": "string",
        "origin": "string",
        "destination": "string",
        "boarding": "2025-09-25T15:42:34.935Z",
        "arriving": "2025-09-25T15:42:34.935Z",
        "fareClass": "string"
      }
    ]
  }
}

Response POST

Represents the execution response of the integration. If you have contracted more than one module, you may receive all at once. Any module not contracted will not be returned.


Result

FieldsDescriptionTypeRequired
executionIdExecution IDGuidYes
analysisIdAnalysis IDGuidYes
transactionIdTransaction IDStringYes
insightsInsights resultsInsights ResultNo

Insights Result

Represents the insights generated by the analysis.

FieldsDescriptionTypeRequired
statusInsights statusStringYes
resultList of generated insightsInsight ArrayNo

Insight

Represents an insight generated by the analysis.

FieldsDescriptionTypeRequired
codeInsight codeStringYes
descriptionInsight descriptionStringYes
typeInsight typeStringYes
categoryInsight categoryStringYes
relevanceInsight relevanceStringYes
relatedToEntity or element related to the insightString ArrayYes

JSON

{
  "executionId": "string",
  "analysisId": "string",
  "transactionId": "string",
  "insights": {
    "status": "string",
    "result": [
      {
        "code": "string",
        "description": "string",
        "type": "string",
        "category": "string",
        "relevance": "string",
        "relatedTo": [
          "string"
        ]
      }
    ]
  }
}

Response GET

Represents the execution response of the analysis query.


Result

FieldsDescriptionTypeRequired
analysisIdAnalysis IDGuidYes
transactionIdTransaction IDStringYes
insightsInsights resultsInsights ResultNo

Insights Result

Represents the insights generated by the analysis.

FieldsDescriptionTypeRequired
statusInsights statusStringYes
resultList of generated insightsInsight ArrayNo

Insight

Represents an insight generated by the analysis.

FieldsDescriptionTypeRequired
codeInsight codeStringYes
descriptionInsight descriptionStringYes
typeInsight typeStringYes
categoryInsight categoryStringYes
relevanceInsight relevanceStringYes
relatedToEntity or element related to the insightString ArrayYes

JSON

{
  "analysisId": "string",
  "transactionId": "string",
  "insights": {
    "status": "string",
    "result": [
      {
        "code": "string",
        "description": "string",
        "type": "string",
        "category": "string",
        "relevance": "string",
        "relatedTo": [
          "string"
        ]
      }
    ]
  }
}

Response Error

Represents the details of a problem returned by the API in case of an error.

FieldsDescriptionTypeRequired
typeURI that identifies the specific problem type. Can be used to categorize the error.StringNo
titleDescriptive title of the problemStringYes
statusHTTP status code associated with the problemIntegerYes
errorsValidation errorsObjectYes
instanceURI that identifies the specific instance of the problemStringNo

JSON

{
  "errors": {
    "string": [
      "string"
    ]
  },
  "type": "string",
  "title": "string",
  "status": 0,
  "traceId": "string"
}