Skip to main content
POST
/
v1
/
estimates
/
{estimateId}
/
convert-to-invoice
Convert estimate to invoice
curl --request POST \
  --url https://api.infinity.swiss/v1/estimates/{estimateId}/convert-to-invoice \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "openingDate": "2023-12-25",
  "isDraft": true
}
'
{
  "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>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.infinity.swiss/llms.txt

Use this file to discover all available pages before exploring further.

Converting an estimate

Creates a new customer invoice that mirrors the estimate’s template, recipient, and positions. The original estimate is preserved and links back to the new invoice via its invoicesFromQuote field, so a single estimate can be converted multiple times if needed. The request body is optional:
  • openingDate — the opening date for the new invoice. Defaults to the current date.
  • isDraft — whether to create the new invoice as a draft. Defaults to true.
Draft estimates cannot be converted. Issue (or accept) the estimate first.

Authorizations

x-api-token
string
header
required

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

Path Parameters

estimateId
string
required

The id of the estimate to convert.

Body

application/json

Optional conversion overrides.

Request body for converting an estimate to an invoice. All fields are optional.

openingDate
string<date>

The opening date for the new invoice in YYYY-MM-DD format. Defaults to the current date.

isDraft
boolean
default:true

When true (the default) the new invoice is created as a draft.

Response

The estimate was converted to an invoice.

invoice
Invoice · object

The full representation of a customer invoice.