# Conversions

Send your conversions to Amazon Ads through the Amazon Ads Conversions API, matched by hashed email and phone.

`POST /v1/events` sends your conversions to an Amazon Ads advertiser through the Amazon Ads Conversions API.

## Send a conversion event

List the account's advertisers with `GET /v1/ads/conversions/destinations`, then name one as the destination. Each event needs an email or a phone:

```bash
curl -X POST "https://zernio.com/api/v1/events" \
  -H "Authorization: Bearer $ZERNIO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "profileId": "PROFILE_ID",
    "destinations": [{ "accountId": "ACCOUNT_ID", "destinationId": "NA:1234567890:ENTITY123:US" }],
    "events": [{
      "eventName": "Purchase",
      "eventTime": 1798804800,
      "eventId": "order_12345",
      "value": 25.99,
      "currency": "USD",
      "items": [{ "id": "SKU-1", "quantity": 2 }],
      "user": {
        "email": "customer@example.com",
        "phone": "+15551234567",
        "ipAddress": "203.0.113.7"
      }
    }]
  }'
```

The destination is `<region>:<profileId>:<accountId>:<country>`. To send every event without naming it each time, create a [forwarding rule](/conversions/create-forwarding-rule).

## Event names

| Zernio event | Amazon conversion type |
|--------------|------------------------|
| `Purchase` | Off-Amazon purchase |
| `Lead`, `QualifiedLead` | Lead |
| `CompleteRegistration`, `StartTrial` | Sign up |
| `AddToCart` | Add to shopping cart |
| `InitiateCheckout` | Checkout |
| `Subscribe` | Subscribe |
| `ViewContent`, `PageView` | Page view |
| `Search` | Search |
| `Contact` | Contact |
| `SubmitApplication` | Application |

These names are kept as the conversion name. Any other name is sent as `Custom` with the type Other.

Amazon makes a conversion definition for each new name and stops at 100 per account, so custom names share one.

## Match keys

Each event needs an email or a phone. Zernio hashes them with SHA-256 before they leave:

| Field | Sent as |
|-------|---------|
| `user.email`, `user.phone` | Hashed match keys. One of them is required |
| `firstName`, `lastName`, `city`, `state`, `zip` | Hashed match keys |
| `country` | As is, else the advertiser's country |

`externalId`, `userAgent`, `sourceUrl` and every click id are ignored.

## How it behaves

- **Value.** `value` is sent on every event. A purchase also gets `currency` and the units sold, summed from `items` quantities.
- **Dedup.** Amazon dedups on `eventId`.
- **Test mode.** None. An event sent with `testCode` fails with "Amazon Ads has no test mode", and nothing reaches Amazon.
- **Consent.** `ipAddress` and the `adStorage` and `adUserData` signals go as Amazon's consent fields. A denied `adUserData` drops the match keys, so the event fails. On a profile with consent first, an event from the EEA, the UK or Switzerland is sent only when `adUserData` is granted and no ad signal is denied. See [Consent](/products/server-side-tracking/consent).
- **Batches.** Events go out in batches of up to 500. Amazon accepts or refuses each event on its own, and a refused one comes back with Amazon's reason.

## If it fails

| Error | Cause | Fix |
|-------|-------|-----|
| `Amazon Ads needs a hashed identifier to match the conversion` | No `email` or `phone`, or `adUserData` denied | Send one of them with consent. |
| `destinationId must be "<region>:<profileId>:<accountId>:<country>"` | The destination is not in that form | Copy it from `GET /v1/ads/conversions/destinations`. |
| `Amazon Ads has no test mode` | The request has a `testCode` | Send it without `testCode` to record it. |
| `401` with `reconnect_required` | Amazon no longer accepts the connection | [Connect again](/platforms/amazon-ads/connect). |

## Related

- [Send events](/conversions/send-events)
- [List conversion destinations](/conversions/list-ad-conversion-destinations)
- [Create a forwarding rule](/conversions/create-forwarding-rule)
- [What each platform gets](/products/conversions-api/platforms)