Skip to content
PayloadPuffin.
Join the waitlist

GET/v1/deliveries/{deliveryId}preview

Fetch one delivery with every attempt ever recorded against it, including attempts that failed before reaching the destination.

Path parameters

  • deliveryId string Required

    A delivery ID, starting with dlv_.

Returns

200

The query result.

  • data object Required

    One delivery and every attempt ever recorded against it.

    • id string Required

      A delivery ID, starting with dlv_.

    • eventId string Required

      An event ID, starting with evt_.

    • destination object Required

      The destination this delivery is sent to.

      Show child attributesHide child attributes
      • id string Required

        A destination ID, starting with dst_.

      • name string | null Required

        The destination name, or its last name when it was deleted. Null only for a destination deleted before names were kept.

      • deleted boolean Required

        True when the destination has been deleted.

    • status string Required

      “held”: the event arrived too late to deliver, and the delivery waits for you to resend it. “pending”: not attempted yet.

      Allowed values: "pending", "held", "delivering", "retrying", "delivered", "failed"

    • attemptCount number Required

      Attempts recorded so far. Retrying stops at 8; a resend adds one more without resetting this, so it can exceed 8.

    • nextAttemptAt string | null Required

      When the next attempt is scheduled. Null when nothing is scheduled, including held and settled deliveries.

    • error string | null Required

      Why the last attempt did not succeed, from either side. Null until one fails or after success.

    • acceptedAt string (date-time) Required

      ISO 8601 timestamp.

    • firstAttemptAt string | null Required

      When the first attempt started. Null until one does.

    • completedAt string | null Required

      When the delivery settled. Null while still live.

    • attempts object[] Required

      Every attempt ever recorded, oldest first.

      Show child attributesHide child attributes
      • id string Required

        An attempt ID, starting with att_.

      • attemptNumber number Required

        One-based; the initial attempt is 1.

        At least 1

      • startedAt string (date-time) Required

        ISO 8601 timestamp.

      • completedAt string | null Required

        Null while the attempt is still running.

      • statusCode number | null Required

        HTTP status returned. Null if no response was received.

      • latencyMs number | null Required

        Duration of the request. Null if none was sent.

      • error string | null Required

        Null on an attempt that succeeded.

      • records object Required

        Whether this attempt’s request and response were kept. Each attempt has its own, so a retry that recorded and the attempt before it that did not can be told apart.

        Show child attributesHide child attributes
        • request object Required

          Whether one side of an attempt (the request it sent, or the response it got) can be read. A response cut at the 1,000,000 byte limit is still available and says so.

          Show child attributesHide child attributes
          • state string Required

            “available”: a write was made when the attempt settled, so opening it reads the stored side or reports not found if the write did not land. “missing”: expected, but the write failed or there was no room to capture it. “not_recorded”: never to be stored, for the reason given.

            Allowed values: "available", "missing", "not_recorded"

          • reason string | null Required

            Why a side is “not_recorded” (disabled, not_sent, no_response) or “missing” (write_failed, shed). Null otherwise.

          • bytes number | null Required

            Body bytes stored, once known.

          • truncated boolean Required

            The capture stopped before the body ended: at the 1,000,000 byte limit, or when the record timeout cut a body still arriving.

        • response object Required

          Whether one side of an attempt (the request it sent, or the response it got) can be read. A response cut at the 1,000,000 byte limit is still available and says so.

          Show child attributesHide child attributes
          • state string Required

            “available”: a write was made when the attempt settled, so opening it reads the stored side or reports not found if the write did not land. “missing”: expected, but the write failed or there was no room to capture it. “not_recorded”: never to be stored, for the reason given.

            Allowed values: "available", "missing", "not_recorded"

          • reason string | null Required

            Why a side is “not_recorded” (disabled, not_sent, no_response) or “missing” (write_failed, shed). Null otherwise.

          • bytes number | null Required

            Body bytes stored, once known.

          • truncated boolean Required

            The capture stopped before the body ended: at the 1,000,000 byte limit, or when the record timeout cut a body still arriving.

Example

Request
curl -X GET "https://api.payloadpuffin.com/v1/deliveries/$DELIVERYID" \
  -H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"
Response 200
{
  "data": {
    "id": "id",
    "eventId": "eventId",
    "destination": {
      "id": "id",
      "name": "name",
      "deleted": true
    },
    "status": "pending",
    "attemptCount": 0,
    "nextAttemptAt": "nextAttemptAt",
    "error": "error",
    "acceptedAt": "acceptedAt",
    "firstAttemptAt": "firstAttemptAt",
    "completedAt": "completedAt",
    "attempts": [
      {
        "id": "id",
        "attemptNumber": 1,
        "startedAt": "startedAt",
        "completedAt": "completedAt",
        "statusCode": 0,
        "latencyMs": 0,
        "error": "error",
        "records": {
          "request": {
            "state": "available",
            "truncated": true
          },
          "response": {
            "state": "available",
            "truncated": true
          }
        }
      }
    ]
  }
}

Errors

Errors use application/problem+json. The code member is stable; branch on it rather than on title or detail.

  • 4XX application/problem+json

    The request was rejected.