Get a delivery
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
deliveryIdstring RequiredA delivery ID, starting with dlv_.
Returns
The query result.200
dataobject RequiredOne delivery and every attempt ever recorded against it.
idstring RequiredA delivery ID, starting with dlv_.
eventIdstring RequiredAn event ID, starting with evt_.
destinationobject RequiredThe destination this delivery is sent to.
Show child attributesHide child attributes
idstring RequiredA destination ID, starting with dst_.
namestring | null RequiredThe destination name, or its last name when it was deleted. Null only for a destination deleted before names were kept.
deletedboolean RequiredTrue when the destination has been deleted.
statusstring 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"
attemptCountnumber RequiredAttempts recorded so far. Retrying stops at 8; a resend adds one more without resetting this, so it can exceed 8.
nextAttemptAtstring | null RequiredWhen the next attempt is scheduled. Null when nothing is scheduled, including held and settled deliveries.
errorstring | null RequiredWhy the last attempt did not succeed, from either side. Null until one fails or after success.
acceptedAtstring (date-time) RequiredISO 8601 timestamp.
firstAttemptAtstring | null RequiredWhen the first attempt started. Null until one does.
completedAtstring | null RequiredWhen the delivery settled. Null while still live.
attemptsobject[] RequiredEvery attempt ever recorded, oldest first.
Show child attributesHide child attributes
idstring RequiredAn attempt ID, starting with att_.
attemptNumbernumber RequiredOne-based; the initial attempt is 1.
At least 1
startedAtstring (date-time) RequiredISO 8601 timestamp.
completedAtstring | null RequiredNull while the attempt is still running.
statusCodenumber | null RequiredHTTP status returned. Null if no response was received.
latencyMsnumber | null RequiredDuration of the request. Null if none was sent.
errorstring | null RequiredNull on an attempt that succeeded.
recordsobject RequiredWhether 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
requestobject RequiredWhether 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
statestring 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"
reasonstring | null RequiredWhy a side is “not_recorded” (disabled, not_sent, no_response) or “missing” (write_failed, shed). Null otherwise.
bytesnumber | null RequiredBody bytes stored, once known.
truncatedboolean RequiredThe capture stopped before the body ended: at the 1,000,000 byte limit, or when the record timeout cut a body still arriving.
responseobject RequiredWhether 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
statestring 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"
reasonstring | null RequiredWhy a side is “not_recorded” (disabled, not_sent, no_response) or “missing” (write_failed, shed). Null otherwise.
bytesnumber | null RequiredBody bytes stored, once known.
truncatedboolean RequiredThe capture stopped before the body ended: at the 1,000,000 byte limit, or when the record timeout cut a body still arriving.
Example
curl -X GET "https://api.payloadpuffin.com/v1/deliveries/$DELIVERYID" \
-H "Authorization: Bearer $PAYLOADPUFFIN_API_KEY"{
"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.
4XXapplication/problem+jsonThe request was rejected.