# Delete an invoice

> Deletes the invoice together with its PDF, items, payment options and e-mail logs, and recalculates the series counter. Fires the invoice.deleted webhook.

## DELETE /invoices/{invoice}

Deletes the invoice together with its PDF, items, payment options and e-mail logs, and recalculates the
series counter. Fires the `invoice.deleted` webhook.

### Request and responses

```json
{
  "servers": [
    {
      "url": "https://app.fsaskaita.lt/api",
      "description": "Production"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "operation": {
    "operationId": "deleteInvoice",
    "description": "Deletes the invoice together with its PDF, items, payment options and e-mail logs, and recalculates the\nseries counter. Fires the `invoice.deleted` webhook.",
    "summary": "Delete an invoice",
    "tags": [
      "Invoices"
    ],
    "parameters": [
      {
        "name": "invoice",
        "in": "path",
        "required": true,
        "description": "The invoice ID.",
        "schema": {
          "type": "string"
        }
      }
    ],
    "responses": {
      "200": {
        "description": "Deleted. The body is empty."
      },
      "401": {
        "$ref": "#/components/responses/AuthenticationException"
      },
      "404": {
        "description": "The invoice does not exist or belongs to another business.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        }
      },
      "429": {
        "description": "Rate limit exceeded. The limit is 60 requests per minute per business, shared across all of its tokens. Wait `Retry-After` seconds before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "message"
              ]
            }
          }
        },
        "headers": {
          "Retry-After": {
            "description": "Seconds to wait before retrying.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Limit": {
            "description": "Requests allowed per minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Remaining": {
            "description": "Requests left in the current minute.",
            "schema": {
              "type": "integer"
            }
          },
          "X-RateLimit-Reset": {
            "description": "Unix timestamp at which the window resets.",
            "schema": {
              "type": "integer"
            }
          }
        }
      }
    }
  },
  "securitySchemes": {
    "bearerAuth": {
      "type": "http",
      "description": "Business token created in the app under Settings, Integrations, API. The token is scoped to exactly one business, has no expiry and is shown only once. Send it as `Authorization: Bearer <token>` together with `Accept: application/json`.",
      "scheme": "bearer"
    }
  }
}
```

### Referenced components

```json
{
  "#/components/responses/AuthenticationException": {
    "description": "Unauthenticated",
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "message": {
              "type": "string",
              "description": "Error overview."
            }
          },
          "required": [
            "message"
          ]
        }
      }
    }
  }
}
```
