POST
/
retail
/
signals
/
purchase
Purchase signals
curl --request POST \
  --url https://{SIGNAL_STORE_ID}.applications.lucidworks.com/retail/signals/purchase \
  --header 'Accept: <accept>' \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --data '[
  {
    "timestamp": 1744305461169,
    "visitorId": "abcc8e25-d30f-2212-9f60-9b45a71453cf",
    "sessionId": "41a50e2-8e32-4674-5429-e1450dfdbb14",
    "queryId": "2a97fc33-3335-3369-c2dc-456b775eb90f",
    "ipAddress": "111.222.333",
    "productDetails": [
      {
        "product": {
          "productId": "1234567",
          "currencyCode": "USD",
          "price": 2592,
          "title": "Silver french door bottom freezer 27.4 cu ft refrigerator",
          "imageuri": "https://example.com/images/refrigerators/silver/bottomfreezer/1234567.jpg"
        },
        "quantity": 123
      }
    ],
    "sourceId": "<string>",
    "uri": "https://example.com/refrigerators/silver/bottomfreezer",
    "cartId": "7f626d8c-4176-4f55-b17d-e89531e92ef7",
    "orderId": "6a678f11d-2265-4d01-a4ed-6e9875bfbda2",
    "revenue": 2592
  }
]'

Headers

Accept
string
default:application/json
required

Header acceptance criteria

Example:

"application/json"

Authorization
string
default:{EMBED_TOKEN}
required

This is the Lucidworks Platform Analytics Studio embed token generated after the signal store is created. To obtain the embed token: 1. Sign in to Lucidworks Platform, click Analytics Studio and then click the signal store. 2. Click Integrations > Signals Using Embed Token. 3. If the token is not generated, click Generate. The embed token displays on the screen and also in all of the cURL examples. 4. Copy that token to paste into your codebase.

Example:

"qasdlkjdoiu1123455WECMMLLJ22eeg"

Content-Type
string
default:application/json
required

Content type format

Example:

"application/json"

Body

application/json · RetailPurchase · object[]
timestamp
integer
required

The event time displayed in epoch time milliseconds.

Example:

1744305461169

visitorId
string
required

The unique identifier for the visitor (user) associated with the signal. The field is a UTF-8 encoded string with a maximum of 128 characters. Do not use personally identifiable information (PII) or user data in the value.

Maximum length: 128
Example:

"abcc8e25-d30f-2212-9f60-9b45a71453cf"

sessionId
string
required

The unique identifier that tracks a specific session of a user's activity over a period of time.

Maximum length: 128
Example:

"41a50e2-8e32-4674-5429-e1450dfdbb14"

queryId
string
required

The unique identifier for the query.

Example:

"2a97fc33-3335-3369-c2dc-456b775eb90f"

productDetails
ProductDetail · object[]
required
sourceId
string
required

A freeform text field used to identify where the API call originates.

The value has no effect on search relevancy.

uri
string
required

The canonical URL of the product's detail page. The field is a UTF-8 encoded string with a maximum of 5000 characters.

Example:

"https://example.com/refrigerators/silver/bottomfreezer"

cartId
string
required

The unique identifier (UUID) of the cart for this interaction.

Example:

"7f626d8c-4176-4f55-b17d-e89531e92ef7"

revenue
number
required

This floating number is the total price of the sale.

Example:

2592

ipAddress
string

This optional parameter is the IP address of the browser or device that generated the signal.

The IP address may be passed in the signal. If it is not passed in the signal, it is extracted from the request, and the last octet is dropped to mask the user's location for security purposes.

Example:

"111.222.333"

orderId
string

This optional unique identifier parameter is used on the purchase_complete signal and identifies an actual purchase as opposed to an attempted purchase.

Example:

"6a678f11d-2265-4d01-a4ed-6e9875bfbda2"