> ## Documentation Index
> Fetch the complete documentation index at: https://product-discovery.developer.voyado.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Latest

> The latest notifications received by Elevate can be viewed in this endpoint.

The latest notifications received by Elevate can be viewed in this endpoint.

```http theme={null}
GET https://{cluster-id}.elevate-api.cloud/api/admin/v4/notifications/latest
```

## Request

<AccordionGroup>
  <Accordion title="Request header parameters">
    | Name              | Description                                   | Example            |
    | ----------------- | --------------------------------------------- | ------------------ |
    | `Api-Key`\*       | API key supplied during onboarding.           | `123456789..`      |
    | `Accept-Encoding` | Allows responses to be compressed using Gzip. | `gzip`             |
    | `Content-Type`    | application/json                              | `application/json` |
  </Accordion>

  <Accordion title="Request query parameters">
    | Name    | Description                                 | Example |
    | ------- | ------------------------------------------- | ------- |
    | `limit` | Maximum number of notifications to retrieve | `10`    |
    | `type`  | Notification type                           | `click` |
  </Accordion>

  <Accordion title="Example request">
    ```bash title="bash" theme={null}
    curl -i \
    -X GET \
    -H 'Api-Key: 123456789..' \
    -H 'Accept-Encoding: null' \
    -H 'Content-Type: null' \
    "https://{cluster-id}.elevate-api.cloud/api/admin/v4/notifications/latest?limit=limit&type=type"
    ```
  </Accordion>
</AccordionGroup>

## Response

<AccordionGroup>
  <Accordion title="Response codes">
    | Status | Description                                                                                                       |
    | ------ | ----------------------------------------------------------------------------------------------------------------- |
    | `200`  | Query accepted, content flattened and serialised to a JSON list.                                                  |
    | `400`  | Invalid or missing required arguments.                                                                            |
    | `404`  | Endpoint is not valid.                                                                                            |
    | `503`  | Service unavailable, no products found in the cluster.                                                            |
    | `500`  | Server error such as cluster unavailable or busy. The response body may contain more information about the error. |
  </Accordion>

  <Accordion title="Example response">
    ```json theme={null}
    {
      "count" : 0,
      "entries" : [ {
        "cached" : false,
        "contentKey" : "842",
        "count" : 4,
        "customerKey" : "0b05119e-eeb8-418a-bbfb-defa0dde417e",
        "market" : "GB",
        "path" : "/LANDING_PAGE/NAVIGATION_RESULT",
        "paymentLines" : [ {
          "quantity" : 2,
          "variantKey" : "<VARIANT_KEY_FROM_YOUR_FEED>",
          "cost" : 15.2,
          "sellingPrice" : 39.0
        } ],
        "productKey" : "1001-100",
        "sessionKey" : "0b05119e-eeb8-418a-bbfb-defa0dde417e",
        "timestamp" : "2020-01-01T10:00:00+01:00",
        "touchpoint" : "DESKTOP",
        "type" : "click",
        "variantKey" : "1001-100-1"
      } ],
      "info" : null
    }
    ```
  </Accordion>

  <Accordion title="Response body schema">
    #### Notifications

    Response object for latest notifications requests

    | Name    | Type                                       | Description                    |
    | ------- | ------------------------------------------ | ------------------------------ |
    | count   | integer                                    | Number of entries returned     |
    | entries | [NotificationEntry](#notificationentry)\[] | a list of notification entries |
    | info    | string                                     | Additional info, if any        |
  </Accordion>
</AccordionGroup>

## Inner Schemas

### NotificationEntry

Summary of a notification. Depending on which type of notification it is, some fields may not be present.

| Name         | Type                           | Description                                                                                                                                                                                                                                      |
| ------------ | ------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| cached       | boolean                        | Whether the notification appears to have come from a cached result<br /><br />Examples: `false`                                                                                                                                                  |
| contentKey   | string                         | Content key related to the notification, eg. for click<br /><br />Examples: `"842"`                                                                                                                                                              |
| count        | integer                        | The number of recent search phrases removed (remove-recent-searches only)<br /><br />Examples: `4`                                                                                                                                               |
| customerKey  | string                         | Customer key included with the notification<br /><br />Examples: `"0b05119e-eeb8-418a-bbfb-defa0dde417e"`                                                                                                                                        |
| market       | string                         | The market it was sent to<br /><br />Examples: `"GB"`                                                                                                                                                                                            |
| path         | string                         | The path from where the notification was sent<br /><br />Examples: `"/LANDING_PAGE/NAVIGATION_RESULT"`                                                                                                                                           |
| paymentLines | [PaymentLine](#paymentline)\[] | Payment lines for each item listed in a payment notification                                                                                                                                                                                     |
| productKey   | string                         | Product key related to the notification<br /><br />Examples: `"1001-100"`                                                                                                                                                                        |
| sessionKey   | string                         | Session key included with the notification<br /><br />Examples: `"0b05119e-eeb8-418a-bbfb-defa0dde417e"`                                                                                                                                         |
| timestamp    | string                         | When the notification was received<br /><br />Examples: `"2020-01-01T10:00:00+01:00"`                                                                                                                                                            |
| touchpoint   | string                         | Either DESKTOP or MOBILE<br /><br />Examples: `"DESKTOP"`                                                                                                                                                                                        |
| type         | string                         | What type of notification this is. Supported values: `click`, `add-to-cart`, `payment`, `add-favorite`, `remove-favorite`, `remove-recent-searches`, `remove-recently-viewed`, `ad-impression`, `end`, `unknown`.<br /><br />Examples: `"click"` |
| variantKey   | string                         | Variant key related to the notification<br /><br />Examples: `"1001-100-1"`                                                                                                                                                                      |

### PaymentLine

| Name         | Type    | Description                                                                                                                                                                                                                                                                                                                                                                                                          |
| ------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| quantity\*   | integer | The quantity of the purchased product.<br /><br />Examples: `2`                                                                                                                                                                                                                                                                                                                                                      |
| variantKey\* | string  | The unique key of the variant.<br /><br />Examples: `"<VARIANT_KEY_FROM_YOUR_FEED>"`                                                                                                                                                                                                                                                                                                                                 |
| cost         | number  | The unit cost of the purchased product. It is strongly recommended to provide cost, either included in a payment notification or as an attribute in the data feed. For more information about cost, see <a href="https://docs.elevate.voyado.cloud/elevate/4/integration/essentials/best-practices/#cost">Best practices</a>.<br /><br />Examples: `15.2`                                                            |
| sellingPrice | number  | The unit selling price of the purchased product. If excluded, Elevate will use the selling price from the data feed. When using <a href="https://docs.elevate.voyado.cloud/elevate/4/integration/data-feed/xml-format-specification/#custom-prices">custom prices</a> in other currencies this should be the price in the base currency, i.e. the same currency as the non-custom price.<br /><br />Examples: `39.0` |
