# Verifying Data Processing

Catalog items are sent to the [Items API](/product-discovery/sending-and-managing-product-data/what-is-the-items-api.md) and they will flow towards various parts of the Fredhopper or XO platform to enable Crownpeak services. You might require a confirmation of an item being processed or integrated into the offered services. To fulfill this need we provide a Feedback API that can be used to get summaries or detailed item journey information.

## Feedback API

The Feedback API is meant for customer integration. The information exposed via this API can be used for triggering alerts or retry strategies on the customer side as well as feeding customer side dashboards or any UI elements.

## Catalog activation statistics

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/full/statistics`

This endpoint queries statistics for a specified catalog version. The statistics are focused on creation and activation. Note that one catalog could have had multiple activation attempts.

#### Path Parameters

| Name    | Type   | Description         |
| ------- | ------ | ------------------- |
| version | string | The catalog version |

#### Query Parameters

| Name        | Type   | Description             |
| ----------- | ------ | ----------------------- |
| environment | string | Name of the environment |
| tenant      | string | Name of the tenant      |

{% tabs %}
{% tab title="200 " %}

```
{
    "catalogCreation": 
        {
            "version": "1",
            "startTimestamp": "2021-04-16T09:37:21.662",
            "endTimestamp": "2021-04-16T09:37:23.628",
            "duration": 1,
            "state": "SUCCESS",
            "message": "Creation of the catalog version #1 succeed // requestId: a21aa652-3c1d-460d-8417-6f17832e4167",
            "receiptId": "a21aa652-3c1d-460d-8417-6f17832e4167"
        }
    "catalogActivations" : [
        {
            "version": "1",
            "startTimestamp": "2021-04-16T09:47:21.662",
            "endTimestamp": "2021-04-16T09:57:23.628",
            "duration": 600,
            "state": "SUCCESS",
            "message": "Activation of the catalog version #1 succeed",
            "receiptId": "a21aa653-3c1d-460d-8417-6f17832e4167"
        },
        ...
    ]
}
```

{% endtab %}
{% endtabs %}

## Single update feedback

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/:receiptId`

This endpoint returns feedback about a specific update, using its unique receiptId.

#### Path Parameters

| Name      | Type   | Description                  |
| --------- | ------ | ---------------------------- |
| receiptId | string | The receiptId for the update |
| version   | string | The catalog version          |

#### Query Parameters

| Name        | Type   | Description             |
| ----------- | ------ | ----------------------- |
| environment | string | Name of the environment |
| tenant      | string | Name of the tenant      |

#### Headers

| Name          | Type   | Description                                       |
| ------------- | ------ | ------------------------------------------------- |
| Authorization | string | Bearer token containing the following permission: |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "update": {
    "startTimestamp": "string",
    "endTimestamp": "string",
    "duration": 0,
    "state": "UNKNOWN",
    "message": "string",
    "itemId": "string",
    "receiptId": "string"
  },
  "type": "DATA"
}
```

{% endtab %}
{% endtabs %}

## Created catalog versions

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version`

This endpoint returns a history of created catalogs.

#### Query Parameters

| Name        | Type    | Description                                                                                  |
| ----------- | ------- | -------------------------------------------------------------------------------------------- |
| tenant      | string  | The name of the tenant                                                                       |
| environment | string  | The name of the environment                                                                  |
| from        | integer | Positive integer. Defaults to 0.                                                             |
| size        | integer | Positive non-zero integer describing the number of elements to show. Must be lower than 100. |

#### Headers

| Name          | Type   | Description                                       |
| ------------- | ------ | ------------------------------------------------- |
| Authorization | string | Bearer token containing the following permission: |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "catalogCreations": [
    {
      "version": "string",
      "startTimestamp": "string",
      "endTimestamp": "string",
      "duration": 0,
      "state": "UNKNOWN",
      "message": "string",
      "receiptId": "string"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## Summary of updates

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/statistics/summary/relative`

This endpoint provides a summary of the number of updates processed in the past specified period e.g. in the last hour, in the last 30 minutes. The response groups counts for successful, failed, and still pending updates.

#### Path Parameters

| Name    | Type   | Description         |
| ------- | ------ | ------------------- |
| version | string | The catalog version |

#### Query Parameters

| Name            | Type    | Description                                                                                                                                     |
| --------------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| tenant          | string  | The name of the tenant                                                                                                                          |
| environment     | string  | The name of the environment                                                                                                                     |
| lastPeriodValue | integer | A count for a period, with the period unit specified in the lastPeriodUnit. The final time interval cannot be higher than 720 hours ( 30 days ) |
| lastPeriodUnit  | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                                                                 |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "numberOfSuccesses": 0,
  "numberOfFailures": 0,
  "numberOfPendingUpdates": 0
}
```

{% endtab %}
{% endtabs %}

## Summary of updates within a time window

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/statistics/summary/absolute`

This endpoint provides a summary of the number of update processed within the given time window. The response groups counts for successful, failed, and still pending updates.

#### Path Parameters

| Name    | Type   | Description         |
| ------- | ------ | ------------------- |
| version | string | The catalog version |

#### Query Parameters

| Name        | Type   | Description                                                                                                                                      |
| ----------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| tenant      | string | The name of the tenant                                                                                                                           |
| environment | string | The name of the environment                                                                                                                      |
| startTime   | string | Must follow the ISO 8601 format. Cannot be in the future.                                                                                        |
| endTime     | string | <p>Must follow the ISO 8601 format. Cannot be in the future.</p><p>\</p></p><p>The time interval cannot be higher than 720 hours ( 30 days )</p> |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "numberOfSuccesses": 0,
  "numberOfFailures": 0,
  "numberOfPendingUpdates": 0
}
```

{% endtab %}
{% endtabs %}

## Summary of updates with a specified state

<mark style="color:blue;">`GET`</mark> `/feedback/catalog-version/:version/updates/statistics/summary/:updateState/relative`

This endpoint returns the number of updates with a certain state with a duration higher than the specified duration parameter. Only updates in the last specified period will be taken into account.

#### Path Parameters

| Name        | Type   | Description                                    |
| ----------- | ------ | ---------------------------------------------- |
| version     | string | The catalog version                            |
| updateState | string | Available values are FAILURE, SUCCESS, PENDING |

#### Query Parameters

| Name            | Type    | Description                                                                                    |
| --------------- | ------- | ---------------------------------------------------------------------------------------------- |
| tenant          | string  | The name of the tenant                                                                         |
| environment     | string  | The name of the environment                                                                    |
| durationValue   | integer | Positive non-zero value. The final duration period cannot be higher than 720 hours ( 30 days ) |
| durationUnit    | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                |
| lastPeriodValue | integer | Positive non-zero value. The final time interval cannot be higher than 720 hours ( 30 days )   |
| lastPeriodUnit  | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "numberOfUpdates": 0
}
```

{% endtab %}
{% endtabs %}

## Summary of updates with a specified state within a time window

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/statistics/summary/:updateState/absolute`

This endpoint returns the number of updates with a certain state with a duration higher than the specified duration parameter. Only updates within the specified time window will be taken into account.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| version     | string | The catalog version                             |
| updateState | string | Available values are: FAILURE, SUCCESS, PENDING |

#### Query Parameters

| Name          | Type    | Description                                                                                                                    |
| ------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------ |
| tenant        | string  | The name of the tenant                                                                                                         |
| environment   | string  | The name of the environment                                                                                                    |
| durationValue | integer | Positive non-zero value. The final duration period cannot be higher than 720 hours ( 30 days )                                 |
| durationUnit  | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                                                |
| startTime     | string  | Must follow the ISO 8601 format. Cannot be in the future                                                                       |
| endTime       | string  | Must follow the ISO 8601 format. Cannot be in the future. The final time interval cannot be higher than 720 hours ( 30 days ). |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "numberOfUpdates": 0
}
```

{% endtab %}
{% endtabs %}

## List of updates with specified state

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/statistics/details/:updateState/relative`

This endpoint returns a list of updates with a certain state with a duration higher than the specified duration parameter. Only updates in the last specified period will be taken into account. Pagination is done by use of the from and size parameters.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| version     | string | The catalog version                             |
| updateState | string | Available values are: FAILURE, SUCCESS, PENDING |

#### Query Parameters

| Name            | Type    | Description                                                                                    |
| --------------- | ------- | ---------------------------------------------------------------------------------------------- |
| tenant          | string  | The name of the tenant                                                                         |
| environment     | string  | The name of the environment                                                                    |
| durationValue   | integer | Positive non-zero value. The final duration period cannot be higher than 720 hours ( 30 days ) |
| durationUnit    | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                |
| lastPeriodValue | integer | Positive non-zero value. The final time interval cannot be higher than 720 hours ( 30 days )   |
| lastPeriodUnit  | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>                |
| from            | integer | Positive integer. Defaults to 0.                                                               |
| size            | integer | Positive non-zero integer. Maximum size is 100.                                                |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "updates": [
    {
      "startTimestamp": "string",
      "endTimestamp": "string",
      "duration": 0,
      "state": "UNKNOWN",
      "message": "string",
      "itemId": "string",
      "receiptId": "string"
    }
  ]
}
```

{% endtab %}
{% endtabs %}

## List of updates with specified state within a time window

<mark style="color:blue;">`GET`</mark> `https://items.attraqt.io/feedback/catalog-version/:version/updates/statistics/details/:updateState/absolute`

This endpoint returns the list of updates with a certain state with a duration higher than the specified duration parameter. Only updates within the specified time window will be taken into account. Pagination is done by use of the from and size parameters.

#### Path Parameters

| Name        | Type   | Description                                     |
| ----------- | ------ | ----------------------------------------------- |
| version     | string | The catalog version                             |
| updateState | string | Available values are: FAILURE, SUCCESS, PENDING |

#### Query Parameters

| Name          | Type    | Description                                                                             |
| ------------- | ------- | --------------------------------------------------------------------------------------- |
| tenant        | string  | The name of the tenant                                                                  |
| environment   | string  | The name of the environment                                                             |
| durationValue | integer | Positive non-zero value. The final duration cannot be higher than 720 hours ( 30 days ) |
| durationUnit  | string  | <p>Available values: SECOND, MINUTE, HOUR</p><p>\</p></p><p>Default: SECOND</p>         |
| startTime     | string  | Must follow the ISO 8601 format                                                         |
| endTime       | string  | Must follow the ISO 8601 format                                                         |
| from          | integer | Positive integer. Defaults to 0                                                         |
| size          | integer | Positive non-zero integer. Maximum size is 100.                                         |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "updates": [
    {
      "startTimestamp": "string",
      "endTimestamp": "string",
      "duration": 0,
      "state": "UNKNOWN",
      "message": "string",
      "itemId": "string",
      "receiptId": "string"
    }
  ]
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://crownpeak.gitbook.io/product-discovery/sending-and-managing-product-data/what-is-the-items-api/feedback-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
