# Record authenticated commerce intent (/es/api-reference/survey-channels/recordRetentionCommerceIntent)

`POST /v1/retention/commerce-intents`

Base URL: `https://api.bitelio.com`

Merchant server only, secret API key with retention:edit AND contacts:edit. Verify the authenticated buyer before mapping Bitelio integrationId/contactId/orderId. Requires enabled tracking and an active order-scoped program with no withdrawal or erased feedback. Shopify product/variant GIDs must belong to that integration. occurredAt must be within the last 24 hours and not in the future. Immutable eventId deduplication rejects changed payloads; 120 requests/project/minute. Public pixel events do not establish trusted purchase intent. Does not create consent or answer surveys. Decision evidence expires in 2–48 hours; the cleanup worker then removes temporary diagnostic history.

## Request body

- `integrationId`: string (required)
- `contactId`: string (required)
- `orderId`: string (required)
- `eventId`: string (required)
- `kind`: enum ("VIEWED_PRODUCT" | "ADDED_TO_CART" | "CHECKOUT_STARTED" | "CHECKOUT_ABANDONED" | "CHECKOUT_COMPLETED") (required)
- `occurredAt`: string (date-time) (required)
- `products`: array<object> (required)
  items:
    - `productId`: string (required)
    - `variantId`: string

Example:

```json
{
  "integrationId": "string",
  "contactId": "string",
  "orderId": "string",
  "eventId": "string",
  "kind": "VIEWED_PRODUCT",
  "occurredAt": "2026-10-24T08:42:45.058Z",
  "products": [
    {
      "productId": "string"
    }
  ]
}
```

## Responses

### `202` — Accepted intent

- `id`: string
- `accepted`: enum (true)
- `duplicate`: boolean
- `expiresAt`: string (date-time)

```json
{
  "id": "string",
  "accepted": true,
  "duplicate": false,
  "expiresAt": "2026-10-24T08:42:45.058Z"
}
```

### `400` — Invalid scope, expired event or idempotency conflict

### `401` — Secret API key required

### `403` — Required project permissions missing

### `429` — Rate limit exceeded; Retry-After gives seconds

### `503` — Rate limiter temporarily unavailable

## Example request

```bash
curl -X POST 'https://api.bitelio.com/v1/retention/commerce-intents' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"integrationId":"string","contactId":"string","orderId":"string","eventId":"string","kind":"VIEWED_PRODUCT","occurredAt":"2026-10-24T08:42:45.058Z","products":[{"productId":"string"}]}'
```
