> For the complete documentation index, see [llms.txt](https://docs.terminal.africa/tship/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.terminal.africa/tship/webhooks/webhook-deliveries.md).

# Webhook Deliveries

## /webhooks

<mark style="color:blue;">`GET`</mark> `https://api.terminal.africa/v1/webhooks/deliveries`&#x20;

Terminal Africa logs every outbound webhook your account receives and lets you inspect delivery attempts or replay a notification when your endpoint missed it.

Provide **one** of the following:

**Option A**

| Query param     | Type   | Required | Description                                                    |
| --------------- | ------ | -------- | -------------------------------------------------------------- |
| `resource_type` | string | Yes\*    | Type of resource. See Supported resource types.                |
| `resource_id`   | string | Yes\*    | ID of the resource, e.g. `SH-ABC123`, `AD-XYZ789`, `PK-DEF456` |

**Option B**&#x20;

| Query param    | Type   | Resolves to               |
| -------------- | ------ | ------------------------- |
| `shipment_id`  | string | `resource_type=shipment`  |
| `address_id`   | string | `resource_type=address`   |
| `packaging_id` | string | `resource_type=packaging` |

\* Required as a pair (`resource_type` + `resource_id`) or via one of the shortcut params above.

#### Optional filters

| Query param  | Type    | Default | Description                                                |
| ------------ | ------- | ------- | ---------------------------------------------------------- |
| `event`      | string  | —       | Filter by event name, e.g. `shipment.delivered`            |
| `webhook_id` | string  | —       | Only return deliveries sent to a specific webhook endpoint |
| `page`       | integer | `1`     | Page number                                                |
| `perPage`    | integer | `20`    | Results per page (max `100`)                               |

{% tabs %}
{% tab title="200: Webhook deliveries retrieved" %}

```
{
  "status": true,
  "message": "Webhook deliveries retrieved successfully",
  "data": {
    "resource_type": "shipment",
    "resource_id": "SH-ABC123",
    "events": [
      {
        "webhook_event_id": "WE-1A2B3C4D5E6F7G8H",
        "event": "shipment.delivered",
        "resource_type": "shipment",
        "resource_id": "SH-ABC123",
        "trigger_source": "system",
        "created_at": "2026-06-25T10:30:00.000Z",
        "deliveries": [
          {
            "delivery_id": "WD-9Z8Y7X6W5V4U3T2S",
            "webhook_event_id": "WE-1A2B3C4D5E6F7G8H",
            "webhook_id": "WA-1234567890ABCDEF",
            "url": "https://merchant.example.com/webhooks/terminal",
            "status": "delivered",
            "http_status": 200,
            "attempt": 1,
            "is_replay": false,
            "error_message": "",
            "sent_at": "2026-06-25T10:30:01.000Z",
            "delivered_at": "2026-06-25T10:30:02.000Z",
            "failed_at": null
          },
          {
            "delivery_id": "WD-ABCDEFGHIJKLMNOP",
            "webhook_event_id": "WE-1A2B3C4D5E6F7G8H",
            "webhook_id": "WA-0987654321FEDCBA",
            "url": "https://backup.example.com/hooks",
            "status": "failed",
            "http_status": 500,
            "attempt": 1,
            "is_replay": false,
            "error_message": "Request failed with status code 500",
            "sent_at": "2026-06-25T10:30:01.000Z",
            "delivered_at": null,
            "failed_at": "2026-06-25T10:30:03.000Z"
          }
        ]
      }
    ],
    "pagination": {
      "page": 1,
      "perPage": 20,
      "prevPage": null,
      "nextPage": null,
      "currentPage": 1,
      "total": 1,
      "pageCount": 1,
      "pagingCounter": 1,
      "hasPrevPage": false,
      "hasNextPage": false
    }
  }
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.terminal.africa/tship/webhooks/webhook-deliveries.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
