---
title: "Retry a failed delivery"
method: POST
path: "/v2/einvoices/deliveries/{id}/retry"
tags: ["deliveries"]
---

# Retry a failed delivery

`POST /v2/einvoices/deliveries/{id}/retry`

## Request

- Base URL: `https://api.ironfang.com/finance`
- URL: `https://api.ironfang.com/finance/v2/einvoices/deliveries/{id}/retry`
- Auth: HTTP bearer

Grants a failed delivery a fresh ladder of up to eight attempts
(32 in all), keeping every earlier attempt in its history. Only a
failed delivery to an enabled destination, whose event has not
expired, can be retried; anything else is `400 malformed_request`.
The body is empty.

## Path parameters

- `id` string, required

## Response `200`

The delivery, pending again. Cache-Control is no-store.

- DeliveryDetail
  - `delivery` Delivery, required
    - `api_version` 'v1' | 'v2', required: The API a result was made through.
    - `attempts` integer, required
    - `created_at` string, date-time, required
    - `destination_id` string, required
    - `event` union, required: The event as queued. Its schema matches api_version.
      - EventV1: The event of an operation made through V1 (financewolf/einvoice/event/v1), described in full by the V1 contract at https://api.ironfang.com/finance/openapi.yaml (DeliveryEvent).
        - `created_at` string, date-time, required
        - `data` object, required
        - `id` string, required
        - `schema` 'financewolf/einvoice/event/v1', required
        - `state_version` 1, required
        - `type` 'einvoice.validation.completed' | 'einvoice.generation.completed' | 'einvoice.operation.failed', required
      - EventV2: The event of an operation made through V2, as a webhook body, an S3 manifest.json and here. Signed and delivered exactly as V1's event.
        - `created_at` string, date-time, required
        - `data` object, required
          - `artifacts` DeliveryArtifact[], required
            - `bytes` integer, required
            - `content_type` 'application/json' | 'application/xml', required
            - `name` 'result.json' | 'document.xml', required
            - `sha256` string, required
          - `batch_id` string
          - `failure_code` string
          - `family` 'detect' | 'peppol-bis-billing-3' | 'xrechnung' | 'zugferd-facturx': The family the result was made under; for a failure, as requested, which may be detect.
          - `input_sha256` string, required
          - `job_id` string
          - `operation` 'validate', required
          - `operation_id` string, required
          - `outcome` 'valid' | 'invalid' | 'indeterminate', required
          - `result_url` string
          - `ruleset_id` string
          - `scope` 'xml' | 'hybrid_pdf': What was checked, xml or hybrid_pdf; for a failure, as requested.
          - `status` 'completed' | 'error', required
          - `usage_charged` boolean, required
          - `variant` 'detect' | 'core' | 'extension' | 'cvd' | 'minimum' | 'basic-wl' | 'basic' | 'en16931' | 'extended' | 'xrechnung': The variant the result was made under; for a failure, as requested, which may be detect.
        - `id` string, required
        - `schema` 'ironfang/finance/einvoice/event/v2', required
        - `state_version` 1, required
        - `type` 'einvoice.validation.completed' | 'einvoice.operation.failed', required
    - `event_id` string, required
    - `expires_at` string, date-time, required
    - `failure_code` 'destination_unavailable' | 'credentials_unavailable' | 'network_error' | 'http_rejected' | 'storage_rejected' | 'object_conflict' | 'result_unavailable' | 'internal_error' | 'lease_expired' | 'event_expired'
    - `finished_at` string, date-time
    - `http_status` integer
    - `id` string, required
    - `max_attempts` integer, required
    - `next_attempt_at` string, date-time, required: Scheduled time for pending work; ignore for terminal deliveries.
    - `operation_id` string, required
    - `status` 'pending' | 'delivering' | 'delivered' | 'failed', required
  - `history` DeliveryAttempt[], required
    - `attempt` integer, required
    - `failure_code` string
    - `finished_at` string, date-time
    - `http_status` integer
    - `started_at` string, date-time, required
  - `schema` 'ironfang/finance/einvoice/delivery/v2', required

## Other responses

- `400`: The request is malformed.
- `401`: The credential is missing or not accepted.
- `403`: The key lacks the scope this operation needs.
- `404`: No such release or result is visible.
- `429`: Too many requests.
- `500`: Ironfang Finance failed. Not a verdict on anything.
- `503`: Destination delivery is not configured on this deployment.

---

[API](https://skmtc.dev/ironfang/apis/ironfang-finance-e-invoicing-api-2.md) · [All operations](https://skmtc.dev/ironfang/apis/ironfang-finance-e-invoicing-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/ironfang/apis/ironfang-finance-e-invoicing-api-2/revisions/8140667e556b?raw)
