List webhook deliveries

GET

GET https://external-api.lia.com.br/external_api/v1/webhook_deliveries

Query Parameters

NameDescriptionRequiredType
webhook_idFilter deliveries by webhook configuration IDfalseString
pagePage number for pagination (default: 1)falseNumber
per_pageNumber of records per page (default: 50, max: 1000)falseNumber

Deliveries are ordered by created_at, newest first. An unknown webhook_id returns an empty results list.

Example request

curl --location 'https://external-api-sandbox.lia.com.br/external_api/v1/webhook_deliveries?webhook_id=86aa3f0c-ca64-56c4-a23d-2e53755b2ced&page=1&per_page=10' \
--header 'Authorization: Bearer YOUR_API_TOKEN'

Example response

{
  "results": [
    {
      "id": "5dd0674e-e214-582f-9749-0fec33963e50",
      "entity_id": "083e2f45-7371-599a-accd-ce4ac61a227c",
      "entity_type": "Bill",
      "webhook_id": "86aa3f0c-ca64-56c4-a23d-2e53755b2ced",
      "event": "paid",
      "created_at": "2024-05-20T14:30:00.000-03:00",
      "updated_at": "2024-05-20T14:30:05.123-03:00",
      "response_code": 200,
      "request_headers": {
        "Content-Type": "application/json",
        "X-Lia-Signature": "3f1c9b2e8a7d4c6b5e0f1a2b3c4d5e6f7a8b9c0d"
      },
      "request_body": {
        "id": "a8f5f167f44f4964e6c998dee827110c",
        "data": {
          "id": "083e2f45-7371-599a-accd-ce4ac61a227c",
          "status": "paid",
          "amount_cents": 10000,
          "paid_at": "2024-05-20T14:29:55.000-03:00"
        },
        "event": "paid",
        "entity": "bill",
        "api_version": "1.0"
      },
      "response_headers": {
        "Content-Type": "application/json",
        "X-Request-Id": "req_abc123"
      },
      "response_body": "{\"success\":true,\"message\":\"Webhook received\"}"
    },
    {
      "id": "37525790-5c93-57c8-b184-64f5aba58fcd",
      "entity_id": "bb7dbbca-3d0f-5f07-b3c7-4421d9e0ac30",
      "entity_type": "Bill",
      "webhook_id": "86aa3f0c-ca64-56c4-a23d-2e53755b2ced",
      "event": "overdue",
      "created_at": "2024-05-19T10:15:00.000-03:00",
      "updated_at": "2024-05-19T10:15:02.456-03:00",
      "response_code": 500,
      "request_headers": {
        "Content-Type": "application/json",
        "X-Lia-Signature": "9e107d9d372bb6826bd81d3542a419d6e277d4d7"
      },
      "request_body": {
        "id": "e4d909c290d0fb1ca068ffaddf22cbd0",
        "data": {
          "id": "bb7dbbca-3d0f-5f07-b3c7-4421d9e0ac30",
          "status": "pending",
          "due_date": "2024-05-15T23:59:59.999-03:00"
        },
        "event": "overdue",
        "entity": "bill",
        "api_version": "1.0"
      },
      "response_headers": {
        "Content-Type": "text/plain"
      },
      "response_body": "Internal Server Error"
    }
  ],
  "total_items": 47,
  "total_pages": 5
}

Response codes

CodeDescription
200Successfully retrieved webhook deliveries list
401Unauthorized - Invalid or missing API token