---
title: "Purchase complete signals"
method: POST
path: "/retail/signals/purchase"
tags: ["Get signals"]
---

# Purchase complete signals

`POST /retail/signals/purchase`

When a user completes a purchase and is taken to the order confirmation page, a signal is recorded.

## Request body

- RetailPurchase[]
  - `timestamp` integer, required — The event time displayed in epoch time milliseconds.
  - `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.
  - `sessionId` string, required — The unique identifier that tracks a specific session of a user's activity over a period of time.
  - `queryId` string, required — The unique identifier for the query.
  - `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.
  - `productDetails` ProductDetail[], required
    - `product` Product, required — Description, unique identifier, price, and image information about the product.
      - `productId` string, required — The unique identifier for the product. The field is a UTF-8 encoded string with a maximum of 128 characters.
      - `currencyCode` string, required — The three-letter code that defines the currency type, displayed in ISO-4217 format.
      - `price` number, double, required — The price of the product when the signal was created.
      - `title` string, required — The title of the product when the signal was created.
      - `imageuri` string, required — The canonical URL of the product image. The field is a UTF-8 encoded string with a maximum of 5000 characters.
    - `quantity` integer — Specifies the quantity of the product associated with the user interaction. This field is optional and defaults to 1 when not provided. If provided, the quantity must be at least 1.
  - `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.
  - `cartId` string, required — The unique identifier (UUID) of the cart for this interaction.
  - `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.
  - `revenue` number, float, required — This floating number is the total price of the sale.

## Response `202`

ACCEPTED

## Other responses

- `400` — INVALID REQUEST

---

[API](https://skmtc.dev/lucidworks/apis/rules-rewrites-api.md) · [All operations](https://skmtc.dev/lucidworks/apis/rules-rewrites-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidworks/rules-rewrites-api/revisions/f2d3747848e8/schema)
