Skip to main content
POST
/
v1
/
estimates
Create estimate
curl --request POST \
  --url https://api.infinity.swiss/v1/estimates \
  --header 'Content-Type: application/json' \
  --header 'x-api-token: <api-key>' \
  --data '
{
  "template": "<string>",
  "openingDate": "2023-12-25",
  "positions": [
    {
      "name": "<string>",
      "singleAmount": 12000,
      "quantity": 2,
      "contraAccount": 5499,
      "unit": "<string>",
      "articleNumber": "<string>",
      "description": "<string>",
      "date": "<string>",
      "discountRate": 50,
      "customTextColumns": {
        "customTextColumn1": "<string>",
        "customTextColumn2": "<string>",
        "customTextColumn3": "<string>"
      }
    }
  ],
  "isDraft": true,
  "recipient": "<string>",
  "customRecipientText": "<string>",
  "title": "<string>",
  "payableInDays": 182,
  "introductoryText": "<string>",
  "closingText": "<string>",
  "columns": [],
  "originalCurrency": "<string>",
  "exchangeRate": 123
}
'
{
  "estimate": {
    "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,
    "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>",
    "signingPerson": "<string>",
    "signedAt": "2023-11-07T05:31:56Z",
    "invoicesFromQuote": [
      "<string>"
    ]
  }
}

Creating an estimate

Estimates (quotes) share their structure with invoices, but never post accounting transactions. The lifecycle status of an estimate (open, accepted, rejected) is managed through the Set estimate status endpoint. To turn an accepted estimate into an invoice, use Convert estimate to invoice. The position structure is identical to invoices — see Create invoice for the full reference. Estimates may also be issued in a foreign currency by providing originalCurrency and exchangeRate together; when converted to an invoice the FX details are carried over.

Example

{
  "template": "6474bb0cccc5b63aae56fa15",
  "openingDate": "2026-05-12",
  "recipient": "6474bb0cccc5b63aae56fa20",
  "title": "Offerte Beratungsmandat Q3",
  "isDraft": false,
  "payableInDays": 30,
  "amountMode": "gross",
  "language": "de",
  "positions": [
    {
      "type": "product",
      "name": "Beratungsmandat",
      "quantity": 40,
      "unit": "h",
      "singleAmount": 18000,
      "contraAccount": 3200,
      "taxCode": "UN81"
    }
  ]
}

Authorizations

x-api-token
string
header
required

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

Body

application/json

The estimate payload.

Request body for creating an estimate.

template
string
required

The id of the invoice template to render the document with.

openingDate
string<date>
required

The opening date (issue date) of the document in YYYY-MM-DD format. For invoices, this is also the date used for the posted accounting transactions.

positions
(ProductPosition · object | DiscountPosition · object | TextPosition · object | SubtotalPosition · object)[]
required

The ordered list of positions on the document. At least one position is required, and discount positions must specify exactly one of percentage or amount.

A standard billable line item with a quantity, single amount, and contra account. Most invoice and estimate positions are of this type.

isDraft
boolean
required

When true the estimate is saved as a draft.

recipient
string

The id of the contact this document is addressed to. Required unless customRecipientText is provided.

customRecipientText
string

An ad-hoc recipient text used when no contact is associated with the document.

Maximum string length: 2000
title
string

Optional document title displayed on the rendered output.

Maximum string length: 128
payableInDays
integer

Payment terms for this document in days from the opening date. Defaults to 30 on create.

Required range: 0 <= x <= 365
introductoryText
string

Text rendered above the positions.

Maximum string length: 2000
closingText
string

Text rendered below the positions.

Maximum string length: 2000
amountMode
enum<string>

Whether position amounts are entered gross (including VAT) or net (excluding VAT).

Available options:
gross,
net
language
enum<string>

The language used to render the document.

Available options:
de,
en,
fr,
it
columns
enum<string>[]

The columns to render in the positions table. If not provided the template default is used.

A column that can be shown on the rendered invoice or estimate.

Available options:
quantity,
unit,
articleNumber,
name,
date,
vatDebt,
vatRate,
singleAmount,
totalAmount,
discountRate,
positionNumber,
customTextColumn1,
customTextColumn2,
customTextColumn3
originalCurrency
string

For foreign-currency documents: the 3-character ISO 4217 currency code the document is denominated in. Must be provided together with exchangeRate. Must be a currency code that is enabled in the organisation.

Required string length: 3
exchangeRate
number

For foreign-currency documents: the conversion rate from the original currency to the primary accounting currency, expressed as 1 originalCurrency = X primaryCurrency. Must be provided together with originalCurrency.

Response

The estimate was created successfully.

estimate
Estimate · object

The full representation of an estimate (quote).