Skip to main content
POST
/
v1
/
invoices
/
{invoiceId}
/
annulment
Annul invoice
curl --request POST \
  --url https://api.infinity.swiss/v1/invoices/{invoiceId}/annulment \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "atDate": "2023-12-25"
}
'
{
  "invoice": {
    "id": "<string>",
    "isDraft": true,
    "number": "<string>",
    "organisation": "<string>",
    "template": "<string>",
    "openingDate": "2023-12-25",
    "dueDate": "2023-12-25",
    "positions": [
      {
        "name": "<string>",
        "singleAmount": 12000,
        "quantity": 2,
        "contraAccount": 5499,
        "id": "<string>",
        "unit": "<string>",
        "articleNumber": "<string>",
        "description": "<string>",
        "date": "<string>",
        "discountRate": 50,
        "customTextColumns": {
          "customTextColumn1": "<string>",
          "customTextColumn2": "<string>",
          "customTextColumn3": "<string>"
        },
        "totalAmount": 123,
        "vatDebt": 123,
        "originalCurrency": "<string>",
        "exchangeRate": 123
      }
    ],
    "totalAmount": 123,
    "totalNetAmount": 123,
    "totalVatDebt": 123,
    "isQrInvoice": true,
    "totalAmountPaid": 123,
    "totalRestAmount": 123,
    "isPaid": true,
    "isOverpaid": true,
    "isAnnulled": true,
    "recipient": "<string>",
    "customRecipientText": "<string>",
    "title": "<string>",
    "payableInDays": 123,
    "introductoryText": "<string>",
    "closingText": "<string>",
    "originalCurrency": "<string>",
    "exchangeRate": 123,
    "columns": [],
    "emailDeliveries": [
      {
        "recipientEmail": "jsmith@example.com",
        "status": "<string>",
        "timestamp": "2023-11-07T05:31:56Z"
      }
    ],
    "publicPdfUrl": "<string>"
  }
}

Annulling an invoice

Annulment reverses a posted invoice without deleting it. The reversing transactions are dated on atDate, which must fall within an editable fiscal year and VAT period. Use annulment (rather than deletion) when the invoice has already been issued to the customer or when its fiscal year is closed.

Authorizations

x-api-token
string
header
required

API token for authentication. Obtain from your Infinity account settings.

Path Parameters

invoiceId
string
required

The id of the invoice.

Body

application/json

The date of the annulment.

Request body for annulling an invoice.

atDate
string<date>
required

The effective annulment date in YYYY-MM-DD format. Used to date the reversing transactions.

Response

The invoice was annulled successfully.

invoice
Invoice · object

The full representation of a customer invoice.