# Notification Object

Source: https://env.7xmtools.com/api-docs/notification-object.html

Represents a price alert triggered by a tracking. Notifications are deleted after 24 hours.

JSON Object · Returned by: Get Notifications & webhooks

A Notification Object represents a price alert. Notifications are deleted after 24 hours.

> **Returned by:** the notification request of the [Tracking API](https://env.7xmtools.com/api-docs/tracking.html). **Provided by:** the *Get Notifications* call of the [Tracking API](https://env.7xmtools.com/api-docs/tracking.html), or an HTTP POST webhook call to the URL set on the [API page](https://env.7xmtools.com/api) or through the *Set Webhook* call of the [Tracking API](https://env.7xmtools.com/api-docs/tracking.html).

## Format

```json
{
    "notificationId": String,
    "asin": String,
    "title": String,
    "image": String,
    "ttl": Integer,
    "createDate": Integer,
    "domainId": Integer,
    "notificationDomainId": Integer,
    "csvType": Integer,
    "trackingNotificationCause": Integer,
    "currentPrices": Integer array,
    "sentNotificationVia": Boolean array,
    "metaData": String,
    "trackingListName": String
}
```

## Fields

| Field | Type | Description |
| --- | --- | --- |
| `notificationId` | String | Unique identifier of this notification. Example: `"a3f1c04e9b27d5836ea1f0c94d2b78ef15a6c390"` |
| `asin` | String | The ASIN (Amazon Standard Identification Number) of the notified product. Example: `"B00M0QVG3W"` |
| `title` | String | The title of the product. **Note:** may contain HTML markup in rare cases. |
| `image` | String | The main image name of the product. Full Amazon image URL: `https://images-na.ssl-images-amazon.com/images/I/<image_name>` |
| `ttl` | Integer | Time to live of the notification in minutes. |
| `createDate` | Integer | The creation date of the notification in [Keepa Time minutes](https://env.7xmtools.com/api-docs/notification-object.html#keepa-time-minutes). |
| `domainId` | Integer | The main Amazon locale of the tracking. See the [valid domain IDs](https://env.7xmtools.com/api-docs/notification-object.html#domain-ids) below. |
| `notificationDomainId` | Integer | The Amazon locale that triggered the notification and determines the currency of the current prices provided. See the [valid domain IDs](https://env.7xmtools.com/api-docs/notification-object.html#domain-ids) below. |
| `csvType` | Integer | The price type that triggered the notification. See the `csv` field indexing in the [Product Object](https://env.7xmtools.com/api-docs/product-object.html). |
| `trackingNotificationCause` | Integer | The cause of the notification. See [TrackingNotificationCause](https://env.7xmtools.com/api-docs/notification-object.html#trackingnotificationcause) below. |
| `currentPrices` | Integer\[\] | The prices or values of the product at the time the notification was created. Uses price type indexing (see the `csv` field in the [Product Object](https://env.7xmtools.com/api-docs/product-object.html)). The price is an integer representing the smallest currency unit of the respective Amazon locale (e.g., euro cents or yen). If no offer was available (e.g., out of stock), the price is `-1`. This field is `null` for tracking expiration notifications. |
| `sentNotificationVia` | Boolean\[\] | Indicates through which notification channels this notification was delivered. Uses [NotificationType](https://env.7xmtools.com/api-docs/notification-object.html#notificationtype) indexing. `true` means the channel was used. |
| `metaData` | String | The metadata of the tracking object that triggered the notification. |
| `trackingListName` | String | The name of the tracking list containing the tracking that triggered this notification (maximum length of 64 characters). |

## TrackingNotificationCause

The cause of a notification. Possible values:

| Value | Cause |
| --- | --- |
| **0** | `EXPIRED`: Tracking expired. |
| **1** | `DESIRED_PRICE`: Desired price met for the first time. |
| **3** | `PRICE_CHANGE_AFTER_DESIRED_PRICE`: Price changed after previously meeting the desired price, and the tracking was rearmed but hasn't passed the desired threshold since. |
| **4** | `OUT_STOCK`: Product is now out of stock for the specified price type (`csvType`). |
| **5** | `IN_STOCK`: Product is back in stock for the specified price type (`csvType`). |
| **6** | `DESIRED_PRICE_AGAIN`: Desired price met again after exceeding the threshold and the tracking was rearmed. |

## NotificationType

The available notification channels.

> **Note:** Only `API` is available for API tracking.

| Value | Type |
| --- | --- |
| **5** | `API`: Push to webhook or pull through API request. |

### Valid domain IDs

| Domain ID | Locale |
| --- | --- |
| **1** | com |
| **2** | co.uk |
| **3** | de |
| **4** | fr |
| **5** | co.jp |
| **6** | ca |
| **8** | it |
| **9** | es |
| **10** | in |
| **11** | com.mx |
| **12** | com.br |

## Keepa Time Minutes

Time format used for all timestamps. To convert to an uncompressed Unix epoch time:

- **For milliseconds:** `(keepaTime + 21564000) * 60000`
- **For seconds:** `(keepaTime + 21564000) * 60`

## Example

A Notification Object as delivered by webhook or the *Get Notifications* call — here the amazon.de Amazon price (`csvType` 0) dropped to the desired price:

```json
{
  "notificationId": "a3f1c04e9b27d5836ea1f0c94d2b78ef15a6c390",
  "asin": "B00M0QVG3W",
  "title": "Canon PowerShot SX400 Digital Camera with 30x Optical Zoom (Black)",
  "image": "51InzcaVqrL.jpg",
  "ttl": 1440,
  "createDate": 7661500,
  "domainId": 3,
  "notificationDomainId": 3,
  "csvType": 0,
  "trackingNotificationCause": 1,
  "currentPrices": [4899, 5299, 4650, 12490],
  "sentNotificationVia": [false, false, false, false, false, true, false],
  "metaData": "customer-42",
  "trackingListName": "My price watches"
}
```

*Illustrative values.* The `currentPrices` array is abridged — it uses the full price type indexing of the [Product Object](https://env.7xmtools.com/api-docs/product-object.html) `csv` field.
