Skip to main content
GET
/
v1
/
webhook-subscriptions
/
{id}
/
delivery-logs
curl --request GET \
  --url 'https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123/delivery-logs?filter[success]=false&page[number]=1&page[size]=20' \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "type": "webhook_delivery_log",
      "id": "whlog_def456",
      "attributes": {
        "event": "points.earned",
        "status_code": 500,
        "success": false,
        "error": "Endpoint returned 500 Internal Server Error",
        "delivered_at": "2024-01-01T00:00:01.000Z",
        "created_at": "2024-01-01T00:00:01.000Z"
      }
    },
    {
      "type": "webhook_delivery_log",
      "id": "whlog_abc123",
      "attributes": {
        "event": "points.earned",
        "status_code": 200,
        "success": true,
        "error": null,
        "delivered_at": "2024-01-01T00:00:00.000Z",
        "created_at": "2024-01-01T00:00:00.000Z"
      }
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "per_page": 20,
    "total_pages": 1
  }
}
List the delivery attempts for a webhook subscription, newest first. Use this to confirm that events reached your endpoint, and to debug failures by inspecting the response status code and any error message.

Path parameters

ParameterTypeDescription
idstringThe webhook subscription ID

Query parameters

ParameterTypeDescription
filter[event]stringOnly return deliveries for this event (e.g. points.earned)
filter[success]stringFilter by outcome: true for successful deliveries, false for failures
page[number]integerPage number (default: 1)
page[size]integerResults per page (default: 20, max: 100)

Delivery log fields

FieldTypeDescription
eventstringThe event that was delivered
status_codeinteger | nullThe HTTP status code your endpoint returned, or null if no response was received
successbooleanWhether the delivery was considered successful
errorstring | nullAn error message when the delivery failed, otherwise null
delivered_atstring | nullISO 8601 timestamp of delivery, or null if it was never delivered
created_atstringISO 8601 timestamp of when the attempt was recorded

Errors

StatusScenario
401Missing or invalid API key
404No subscription with this ID exists for the shop
429Rate limit exceeded (6 requests/second)
curl --request GET \
  --url 'https://api.mageloyalty.com/v1/webhook-subscriptions/whsub_abc123/delivery-logs?filter[success]=false&page[number]=1&page[size]=20' \
  --header 'Authorization: <api-key>'
{
  "data": [
    {
      "type": "webhook_delivery_log",
      "id": "whlog_def456",
      "attributes": {
        "event": "points.earned",
        "status_code": 500,
        "success": false,
        "error": "Endpoint returned 500 Internal Server Error",
        "delivered_at": "2024-01-01T00:00:01.000Z",
        "created_at": "2024-01-01T00:00:01.000Z"
      }
    },
    {
      "type": "webhook_delivery_log",
      "id": "whlog_abc123",
      "attributes": {
        "event": "points.earned",
        "status_code": 200,
        "success": true,
        "error": null,
        "delivered_at": "2024-01-01T00:00:00.000Z",
        "created_at": "2024-01-01T00:00:00.000Z"
      }
    }
  ],
  "meta": {
    "total": 2,
    "page": 1,
    "per_page": 20,
    "total_pages": 1
  }
}