# Undelivered Webhook Event Services

All services related to webhook events which are not delivered to target service are listed in this page.

### `GET` List Undelivered Webhook Events

This service is used to get all undelivered webhook events with detailed information.

**Path:** `/api/v1/oms/settings/undelivered_webhooks/`

**Query Parameters**

The following query parameters can be used to get the details of undelivered webhook events.

| Parameter | Data Type | In     | Description                         |
| --------- | --------- | ------ | ----------------------------------- |
| token     | string    | header | The API key of the customer account |

**Example Request**

To get a detailed list of all undelivered webhook events, a `GET` request should be sent to the `/api/v1/oms/settings/undelivered_webhooks/` endpoint. In the headers, set the `Authorization` header to include the token for\
authentication.

Here's an example of how to make the request in python:

```python
import requests

url = "https://{domain_url}/api/v1/oms/settings/undelivered_webhooks/"
token = "f532eXXXXXXXXXXXXXXXXX201XXXXX9332d"

headers = {
    'Content-Type': 'application/json',
    'Authorization': f'Token {token}'
}

response = requests.request('GET', url, headers=headers)

print(response.json())

```

**Example Response (200 OK)**

In a response with a status code of 200 OK, the API returns the details of the undelivered webhook events. The response body contains a `JSON` object with the undelivered webhook events and their attributes such as ID, response\_content, response\_http\_status, delivered, retry\_count, object\_id, etc.

These parameters are described in the following table.

| Parameter              | Data Type | Description                                                                 |
| ---------------------- | --------- | --------------------------------------------------------------------------- |
| id                     | integer   | Primary key of the event                                                    |
| webhook                | json      | Webhook information of the webhook event                                    |
| created\_date          | date      | Creation date                                                               |
| modified\_date         | date      | Last modified date                                                          |
| uuid                   | string    | Unique key of the webhook event                                             |
| request\_payload       | json      | Request data sent with webhook event                                        |
| response\_content      | string    | Response data returned from target service for the webhook event            |
| response\_http\_status | integer   | Response http status of the webhook event request                           |
| delivered              | boolean   | If the webhook event is processed successfully by the target service or not |
| request\_datetimes     | boolean   | Which times webhook event was sent                                          |
| retry\_count           | integer   | How many times webhook event was sent                                       |
| object\_id             | integer   | ID of the object to which the webhook event is sent                         |
| content\_type          | integer   | Content type of the object to which the webhook event is sent               |

This example response serves as a reference to understand the structure and data format returned from this API service.

```json
{
  "count": 1,
  "next": null,
  "previous": null,
  "results": [
    {
      "id": 5941,
      "webhook": {
        "id": 68,
        "retry_countdown_config": {
          "choice": "fixed",
          "kwargs": {
            "seconds": 60
          }
        },
        "created_date": "2022-04-15T13:40:22.651798Z",
        "modified_date": "2023-10-11T11:38:26.237910Z",
        "target_url": "https://httpstat.us/500",
        "is_active": true,
        "secret_key": "",
        "event_type": "package.status.shipped",
        "callback": "",
        "additional_headers": {},
        "config": {}
      },
      "created_date": "2023-10-12T10:07:35.200005Z",
      "modified_date": "2023-10-12T10:08:23.085564Z",
      "uuid": "2877cadd-fc60-4a5a-a54f-b7be716f4f25",
      "request_payload": {
        "event": {
          "type": "package.status.shipped",
          "uuid": "2877caddfc604a5aa54fb7be716f4f25"
        },
        "payload": {
          "id": 8812,
          "city": "İSTANBUL",
          "state": {
            "id": 44,
            "name": "Shipped",
            "config": {},
            "enum_class": "PackageStatus",
            "enum_value": "700",
            "content_type": 4,
            "created_date": "2021-06-30T14:43:26.945309Z",
            "translations": {
              "en-us": {
                "name": "Shipped"
              },
              "tr-tr": {
                "name": "Kargolanmış"
              }
            },
            "modified_date": "2022-10-14T10:39:33.524002Z"
          },
          "number": "2406670106311153P1",
          "commands": [
            {
              "id": 399,
              "slug": "package__update_package_shipment_status__shipped__shipped",
              "label": "Kargo Durumunu Sorgula",
              "command": "UPDATE_PACKAGE_SHIPMENT_STATUS",
              "source_state": 44,
              "translations": null,
              "configuration": {},
              "ui_visibility": [
                "third_party",
                "oms_web"
              ],
              "destination_state": 44,
              "is_packageitem_parameter_required": false
            },
            {
              "id": 35,
              "slug": "package__update_invoice_of_the_package__shipped__shipped",
              "label": "Update Invoice",
              "command": "UPDATE_INVOICE_OF_THE_PACKAGE",
              "source_state": 44,
              "translations": null,
              "configuration": {},
              "ui_visibility": [
                "oms_web",
                "instore"
              ],
              "destination_state": 44,
              "is_packageitem_parameter_required": false
            },
            {
              "id": 266,
              "slug": "package__deliver_package__shipped__delivered",
              "label": "teslim et",
              "command": "DELIVER_PACKAGE",
              "source_state": 44,
              "translations": null,
              "configuration": {},
              "ui_visibility": [
                "third_party",
                "oms_web",
                "instore"
              ],
              "destination_state": 47,
              "is_packageitem_parameter_required": false
            }
          ],
          "order_id": 8449,
          "shipment": {
            "id": 4424,
            "state": 96,
            "invoice": null,
            "package": 8812,
            "awb_number": "35667",
            "created_date": "2023-09-29T09:33:36.318472Z",
            "query_number": "10227",
            "cargo_company": {
              "id": 728,
              "name": "speeta extension",
              "erp_code": "speeta",
              "is_active": true,
              "created_date": "2023-01-23T15:14:07.829927Z",
              "modified_date": "2023-09-29T09:28:43.244299Z",
              "shipping_company": "speeta"
            },
            "modified_date": "2023-09-29T09:33:36.318497Z",
            "update_date_time": "2023-09-29T09:33:36.317868Z",
            "pay_on_delivery_amount": null,
            "estimated_delivery_date": null
          },
          "remote_id": null,
          "date_placed": "2023-09-28T08:17:13.206512Z",
          "order_notes": null,
          "channel_name": "PZ Shop",
          "created_date": "2023-09-28T08:19:29.061054Z",
          "id_encrypted": "ODgxMg:1qqsbO:JWhY7dOh2Y7HpmC0eiVLXKyYaECbB9-8-gnecF5N4t8",
          "order_number": "2406670106311153",
          "payment_type": "funds_transfer",
          "delivery_type": "standard",
          "modified_date": "2023-10-12T10:07:34.370108Z",
          "shipment_date": "2023-10-12T10:07:34.385941Z",
          "delivery_range": null,
          "invoice_number": null,
          "shipping_label": {
            "id": 4490,
            "uuid": "7d2aa09d-50d7-49d1-be98-f8f765915fd2",
            "is_file": true,
            "preview_url": "/api/v1/oms/shipping-label/4490/preview/",
            "full_path_url": "https://{domain_url}/api/v1/oms/shipping-label/4490/preview/"
          },
          "stock_location": {
            "id": 1,
            "conf": {
              "clickpost_sender_address_id": "10101"
            },
            "name": "PZ Store 1",
            "tags": [],
            "email": "",
            "engine": 1,
            "address": {
              "id": 1,
              "city": {
                "pk": 40,
                "name": "İSTANBUL",
                "country": 1,
                "latitude": "41.01121800",
                "is_active": true,
                "longitude": "28.97817800"
              },
              "line": "Pınar, Katar Cd No:73, 34460 Sarıyer/İstanbul",
              "notes": null,
              "title": "PZ Store 1",
              "country": {
                "pk": 1,
                "code": "tr",
                "name": "Türkiye",
                "latitude": "39.05625600",
                "is_active": true,
                "longitude": "35.30207500"
              },
              "mapping": null,
              "district": {
                "pk": 35463,
                "city": 40,
                "name": "PINAR MAH",
                "latitude": "41.11495200",
                "township": 457,
                "is_active": true,
                "longitude": "29.03134900"
              },
              "latitude": "41.02462960",
              "postcode": null,
              "township": {
                "pk": 457,
                "city": 40,
                "name": "SARIYER",
                "latitude": "41.16672000",
                "is_active": true,
                "longitude": "29.05731900"
              },
              "is_active": true,
              "longitude": "28.88940280"
            },
            "erp_code": "1",
            "priority": 10,
            "is_active": true,
            "fax_number": "76545",
            "omnitron_id": 1,
            "created_date": "2021-07-06T13:07:14.377251Z",
            "daytime_phone": "765432",
            "evening_phone": "76543",
            "modified_date": "2023-09-20T09:54:59.633412Z",
            "is_pickup_location": true,
            "is_return_available": true,
            "stock_location_type": "store",
            "is_delivery_location": true,
            "is_fulfillment_center": true,
            "target_packing_interval": "5 00:00:00",
            "use_as_shipper_location": true,
            "target_transfer_interval": "3 00:00:00",
            "is_fast_delivery_available": true
          },
          "packageitem_set": [
            {
              "id": 9043,
              "state": {
                "id": 68,
                "name": "Shipped",
                "config": {},
                "enum_class": "PackageItemStatus",
                "enum_value": "800",
                "content_type": 5,
                "created_date": "2021-06-30T14:43:27.168636Z",
                "translations": {
                  "en-us": {
                    "name": "Shipped"
                  },
                  "tr-tr": {
                    "name": "Kargolanmış"
                  }
                },
                "modified_date": "2022-10-14T10:39:33.481641Z"
              },
              "package": 8812,
              "serial_no": null,
              "order_item": {
                "id": 8350,
                "image": null,
                "order": 8449,
                "price": "300.00",
                "state": {
                  "id": 28,
                  "name": "Preparing",
                  "config": {},
                  "enum_class": "OrderStatus",
                  "enum_value": "450",
                  "content_type": 3,
                  "created_date": "2021-06-30T14:43:26.801262Z",
                  "translations": {
                    "en-us": {
                      "name": "Preparing"
                    },
                    "tr-tr": {
                      "name": "Hazırlanıyor"
                    }
                  },
                  "modified_date": "2022-10-14T10:39:33.568211Z"
                },
                "product": {
                  "id": 366,
                  "sku": "AKN-006",
                  "name": "Ultimate Organic Cotton T Shirt With Crew Neck",
                  "barcode": null,
                  "base_code": "AKN-006",
                  "attributes": {
                    "hallo": "Voorbeeld",
                    "Length": "Long",
                    "integration_SizeId": "4b81d08c-80c1-43b1-9cd9-8659b5dffbab",
                    "integration_kol_boyu": "kısa"
                  },
                  "omnitron_id": 8360,
                  "created_date": "2022-11-10T07:05:30.470253Z",
                  "modified_date": "2022-11-10T07:05:30.470264Z",
                  "extra_attributes": {},
                  "productimage_set": [
                    {
                      "id": 466,
                      "url": "https://{cdn_url}/products/2022/09/07/8360/f7428174-1948-4dac-a187-463aff7c4155.jpg",
                      "order": 0,
                      "product": 366
                    }
                  ],
                  "attributes_kwargs": {
                    "hallo": {
                      "label": "Voorbeeld",
                      "value": "Voorbeeld",
                      "data_type": "valuelabel"
                    },
                    "Length": {
                      "label": "Long",
                      "value": "Long",
                      "data_type": "dropdown"
                    },
                    "integration_SizeId": {
                      "label": "XL",
                      "value": "4b81d08c-80c1-43b1-9cd9-8659b5dffbab",
                      "data_type": "dropdown"
                    },
                    "integration_kol_boyu": {
                      "label": "kısa",
                      "value": "kısa",
                      "data_type": "dropdown"
                    }
                  },
                  "remote_modified_date": "2022-09-09T13:59:00.218866Z"
                },
                "tax_rate": "8.00",
                "attributes": {},
                "net_amount": "300.00",
                "price_list": {
                  "pk": 34,
                  "code": "pz_fiyat_list",
                  "name": "pz_fiyat_list",
                  "currency": "try",
                  "created_date": "2021-02-25T13:41:08.252536Z",
                  "is_auto_sync": false,
                  "modified_date": "2023-02-02T13:27:03.825072Z"
                },
                "stock_list": {
                  "pk": 34,
                  "code": null,
                  "name": "pz_stok_list",
                  "created_date": "2021-02-25T13:41:20.523128Z",
                  "is_auto_sync": false,
                  "modified_date": "2021-02-25T13:41:20.523152Z"
                },
                "tax_amount": null,
                "extra_field": {
                  "price_extra_field": {},
                  "stock_extra_field": {}
                },
                "omnitron_id": 72073,
                "created_date": "2023-09-28T08:19:05.319822Z",
                "retail_price": "999.00",
                "modified_date": "2023-09-29T09:33:36.901429Z",
                "price_currency": "try",
                "discount_amount": "0.00",
                "attributes_kwargs": {},
                "parent_omnitron_id": null,
                "without_net_amount": null,
                "installment_interest_amount": null
              },
              "unit_weight": null,
              "created_date": "2023-09-28T08:19:29.080600Z",
              "denial_reason": null,
              "modified_date": "2023-10-12T10:07:34.425054Z",
              "transfer_order": null,
              "selected_barcode": null,
              "discrepancy_reason": null
            }
          ],
          "tracking_number": "35667",
          "shipping_address": {
            "id": 1817,
            "city": {
              "pk": 7,
              "name": "ISTANBUL",
              "country": 1,
              "latitude": "39.92076300",
              "is_active": true,
              "longitude": "32.85404900"
            },
            "line": "Test Caddesi Test Sokak 6/9",
            "email": "test@akinon.com",
            "notes": null,
            "title": "Test",
            "tax_no": "",
            "country": {
              "pk": 1,
              "code": "tr",
              "name": "Türkiye",
              "latitude": "39.05625600",
              "is_active": true,
              "longitude": "35.30207500"
            },
            "mapping": null,
            "customer": {
              "pk": 1124,
              "email": "test@akinon.com",
              "channel": 1,
              "erp_code": null,
              "last_name": "VELİ",
              "first_name": "ALİ",
              "phone_number": "05555555555"
            },
            "district": {
              "pk": 5309,
              "city": 7,
              "name": "ÇİFTE HAVUZLAR",
              "latitude": "39.93543200",
              "township": 68,
              "is_active": true,
              "longitude": "32.57278600"
            },
            "postcode": "06420",
            "township": {
              "pk": 68,
              "city": 7,
              "name": "ESENLER",
              "latitude": "39.95817300",
              "is_active": true,
              "longitude": "32.58453600"
            },
            "is_active": true,
            "last_name": "VELİ",
            "first_name": "ALİ",
            "tax_office": "",
            "omnitron_id": 3994,
            "address_type": "customer",
            "company_name": "",
            "created_date": "2022-03-21T11:31:50.745452Z",
            "phone_number": "05433506499",
            "modified_date": "2023-09-29T09:33:13.903269Z",
            "e_bill_taxpayer": false
          },
          "extra_information": {},
          "omnitron_order_id": 65341,
          "order_has_gift_box": false,
          "channel_omnitron_id": 1,
          "order_gift_box_note": null,
          "target_packing_date": "2023-10-03T08:17:13.206512Z",
          "is_click_and_collect": false,
          "order_retail_store_id": null
        }
      },
      "response_content": "b'500 Internal Server Error'",
      "response_http_status": 500,
      "delivered": false,
      "request_datetimes": [
        "2023-10-12T10:08:22.570834Z",
        "2023-10-12T10:08:21.751264Z",
        "2023-10-12T10:08:20.754762Z",
        "2023-10-12T10:08:18.979371Z",
        "2023-10-12T10:08:11.329515Z",
        "2023-10-12T10:08:10.220704Z",
        "2023-10-12T10:08:09.103718Z",
        "2023-10-12T10:08:07.066381Z",
        "2023-10-12T10:08:05.933162Z",
        "2023-10-12T10:08:03.305686Z",
        "2023-10-12T10:07:34.698690Z"
      ],
      "retry_count": 11,
      "object_id": 8812,
      "content_type": 4
    }
  ]
}
```


---

# 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://apidocs.akinon.com/oms/undelivered-webhook-event-services.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.
