# Webhook notification

Returns the notification (invoking) list of webhooks and provides information about these. If you do not have 
a registered webhook, and the given event happens (for example creation of an order), the registered URLs are 
called. A notification about a call contains information about the webhook that requested the call, the URL 
called, the time, delivery status, number of delivery attempts and other information.


It is possible to request 7 days history of notification.

Endpoint: GET /api/webhooks/notifications
Version: 1.0.0
Security: shoptetAccessToken, shoptetPrivateApiToken

## Query parameters:

  - `status` (string)
    supported values: new, failed, success
    Example: "failed"

  - `event` (string)
    event
    Example: "order:delete"

  - `active` (boolean)
    flag that the notification was not delivered yet, and the number of
attempts did not reach the maximum amount. The notification will be
resent to the target URL
    Example: true

  - `from` (string)
    DateTime for the log, up to the present, which we are interested in.
+ in the time zone designation, html shall be coded as %2B.
    Example: "2018-05-28T14:17:00+02:00"

  - `itemsPerPage` (integer)
    Returned items per page. Default value is 20. Max value is 500.
    Example: 50

  - `page` (integer)
    Page number to return. Default value is 1.
    Example: 3

## Header parameters:

  - `Content-Type` (string, required)

## Response 200 fields (application/json):

  - `data` (object, required)

  - `data.notifications` (array, required)

  - `data.notifications.id` (integer, required)
    notification unique ID

  - `data.notifications.webhookId` (integer, required)
    link to webhook, which invoked the notification

  - `data.notifications.webhookUrl` (string, required)
    webhook URL in the instant, when the notification was created

  - `data.notifications.event` (string, required)
    event, see [Webhook event types](#section/code-lists/webhook-event-types) code list

  - `data.notifications.eventCreated` (string,null, required)
    time of event creation - notification

  - `data.notifications.created` (string,null, required)
    date and time, when the webhook notification was created

  - `data.notifications.attempted` (string,null, required)
    date and time of last notification delivery attempt at webhook URL (can be null)

  - `data.notifications.attempts` (integer, required)
    number of implemented attempts to deliver the notification

  - `data.notifications.status` (string, required)
    results of the last attempt to deliver the notification

  - `data.notifications.active` (boolean, required)
    flag that the notification was not delivered yet, and the number of attempts did not reach the maximum amount The notification will be resent to the target URL

  - `data.notifications.data` (object, required)
    content of sent notification

  - `data.notifications.data.eshopId` (integer, required)
    number of (id) e-shop

  - `data.notifications.data.event` (string, required)

  - `data.notifications.data.eventCreated` (string,null, required)

  - `data.notifications.data.eventInstance` (string, required)
    Identification of the entity that the notification concerns. For example order number, product GUID, etc.

  - `data.paginator` (object, required)

  - `data.paginator.totalCount` (integer, required)
    total number of available records

  - `data.paginator.page` (integer, required)
    current page

  - `data.paginator.pageCount` (integer, required)
    total available of pages

  - `data.paginator.itemsOnPage` (integer, required)
    number of currently returned records

  - `data.paginator.itemsPerPage` (integer, required)
    required number of records per page

  - `errors` (array,null, required)

  - `errors.errorCode` (string, required)
    Short text error identification

  - `errors.message` (string, required)
    Descriptive error message

  - `errors.instance` (string, required)
    Identification of the entity referenced

  - `metadata` (object, required)

  - `metadata.requestId` (string, required)
    Request identifier. Useful for logging/reporting purposes.


