Tracking clicks and providing relevance feedback
Attribution is critical for compliance with retail affiliate programs and for improving the performance of your agent's recommendations.
Every product returned by the /search endpoint includes a unique impression_id. You must track when a user clicks on a product to ensure proper attribution.
POST /clicks/{impression_id}
| Parameter | Type | Description |
|---|---|---|
impression_id | uuid | The unique identifier from the AdResponse object. |
curl -X POST https://api.vkra.org/clicks/550e8400-e29b-41d4-a716-446655440000 \
-H "x-api-key: YOUR_API_KEY"Providing feedback on the relevance of recommendations helps improve the matching model over time. This creates a more effective experience for your users.
POST /feedback
| Parameter | Type | Required | Description |
|---|---|---|---|
request_id | uuid | Yes | The request_id from the search response. |
product_id | uuid | Yes | The product_id from the AdResponse. |
relevant | boolean | Yes | Whether the recommendation was relevant to the user's intent. |
reason | string | No | Optional explanation for why the product was or wasn't relevant. |
user_clicked | boolean | No | Whether the user clicked on the product. |
curl -X POST https://api.vkra.org/feedback \
-H "x-api-key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"product_id": "product_123",
"relevant": false,
"reason": "Product was out of the user budget range."
}'When displaying products from retailers like Amazon or Skimlinks, you must adhere to their disclosure requirements.
disclosure_text provided in the AdResponse./clicks endpoint.last_updated_at field to ensure you are not displaying stale pricing or availability data.