Confirmations

List all confirmations

GET /api/confirmations
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<confirmations type=&quot;array&quot; page=&quot;1&quot; per_page=&quot;100&quot; total=&quot;2&quot;>
<confirmation>
…
</confirmation>
<confirmation>
…
</confirmation>
</confirmations>

You can filter the result by parameters:

GET /api/confirmations?confirmation_number=AB123

Lists all invoices with “AB123” in the confirmation number. Upper and lower case are ignored.
The following filter parameters are available:

ParameterDescription
client_idID of the client
contact_idID of the contact
confirmation_numberConfirmation number
statusStatus (DRAFT, COMPLETED, CANCELED). More than one statuses could be given as a comma separated list. Theses statuses will be logically OR-connected.
fromOnly show invoices since this date (format YYYY-MM-DD)
toOnly show invoices up to this date (format YYYY-MM-DD)
labelFree text search in label text
introFree text search in introductory text
noteFree text search in explanatory notes
tagsComma separated list of tags
article_idID of an article

Get a single confirmation

GET /api/confirmations/{id}
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<confirmation>
<id type=&quot;integer&quot;>1</id>
<client_id type=&quot;integer&quot;>123</client_id>
<contact_id type=&quot;integer&quot;></contact_id>
<created type=&quot;datetime&quot;>2007-12-13T12:12:00+01:00</created>
<confirmation_number>AB123</confirmation_number>
<number type=&quot;integer&quot;>123</number>
<number_pre>AB</number_pre>
<number_length type=&quot;integer&quot;>0</number_length>
<status>COMPLETED</status>
<date type=&quot;date&quot;>2010-10-01</date>

<address>Billomat GmbH &amp;amp;amp;amp;amp; Co. KG
Hollertszug 26
57562 Herdorf
Deutschland</address>    <title></title>
<label>project 123</label>
<intro>Dear sir or madam,…</intro>
<note>Best regards</note>
<total_gross type=&quot;float&quot;>107.1</total_gross>
<total_net type=&quot;float&quot;>90.0</total_net>
<net_gross>NET</net_gross>
<reduction>10</reduction>
<total_gross_unreduced type=&quot;float&quot;>119.0</total_gross_unreduced>
<total_net_unreduced type=&quot;float&quot;>100.0</total_net_unreduced>
<currency_code>EUR</currency_code>
<quote type=&quot;float&quot;>1.0000</quote>
<customerportal_url>https://mybillomatid.billomat.net/customerportal/confirmations/show/entityId/123?hash=123456789aabbcc</customerportal_url>
<taxes type=&quot;array&quot;>
<tax>
<name>MwSt</name>
<rate type=&quot;float&quot;>19.0</rate>
<amount type=&quot;float&quot;>19.0</amount>
</tax>
</taxes>
<offer_id></offer_id>
<template_id></template_id>
</confirmation>

status can have the following values:

  • DRAFT
  • COMPLETED
  • CANCELED
  • CLEARED
    net_gross can have the following values:
  • NET
  • GROSS
    In addition to the confirmation combined taxes (taxes) will be returned.
    Items and comments can be accessed separately.

Create a confirmation

POST /api/confirmations
XML elementDescriptionTypeDefault valueMandatory
client_idID of the clientINTyes
contact_idID of the contactINT
addressThe addressALNUMClient’s address
number_prePrefixALNUMValue taken from the settings
numberserial numberINTnext free number
number_lengthMinimum length of the confirmationnumber (to be filled with leading zeros)INTValue taken from the settings
dateDate of the confirmationDATEtoday
titleTitle of the documentALNUM
labelLabel text to describe the projectALNUM
introIntroductory textALNUMValue taken from the settings
noteExplanatory notesALNUMValue taken from the settings
reductionReduction (absolute or percent: 10/10%)ALNUM
currency_codeCurrencyISO currency codeDefault currency
net_grossPrice basis (gross or net prices)ALNUM (“NET”, “GROSS”)Default value taken from the settings
quoteCurrency quote (for conversion into standard currency)FLOAT1.0000
offer_idThe ID of the estimate, if the confirmation was created from an estimate.INT
free_text_idThe ID of the free text to set title, label, intro and note.INT
template_idThe ID of the template to be used to complete the confirmation.INTID of the default template

status at creation is always DRAFT.

When initially created in DRAFT state, the confirmation_number is returned as an empty response. It is only on completion of a confirmation that the confirmation number is calculated and gets a value.


The remaining properties are automatically calculated.


Confirmation items (confirmation-items) can be specified directly at creation. Please find a documentation of the XML elements at Create confirmation items, but the XML element confirmation_id need not be specified with.

<confirmation>
<client_id>5</client_id>
<date>2009-11-17</date>
<confirmation-items>
<confirmation-item>
<unit>Piece</unit>
<unit_price>1.23</unit_price>
<quantity>1.5</quantity>
<title>Pattern</title>
</confirmation-item>
<confirmation-item>
<unit>Piece</unit>
<unit_price>1.23</unit_price>
<quantity>5</quantity>
<title>Pattern 2</title>
</confirmation-item>
</confirmation-items>
</confirmation>
<?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?>
<confirmation>
<id type=&quot;integer&quot;>1234</id>
<client_id type=&quot;integer&quot;>5</client_id>
<created type=&quot;datetime&quot;>2007-12-13T12:12:00+01:00</created>
<confirmation_number>AB124</confirmation_number>
<number type=&quot;integer&quot;>124</number>
<number_pre>AB</number_pre>
<number_length type=&quot;integer&quot;>0</number_length>
<date type=&quot;date&quot;>2009-11-17</date>
…
</confirmation>

Edit a confirmation

PUT /api/confirmations/{id}

A confirmation can basically be edited in draft status (DRAFT) only.
Items and comments could not be edited at the confirmation. Please use the appropriate resource instead.

<confirmation>
<date>2009-10-13</date>
</confirmation>

Delete a confirmation

DELETE /api/confirmations/{id}

Deletes a confirmation with all documents (PDFs), items and comments.

Complete confirmation

PUT /api/confirmations/{id}/complete

Completes a confirmation in the draft status (DRAFT). Here, the status of open (OPEN) is set and a PDF is generated and stored in the file system.

The optional parameter template_id determines which template is used to create a pdf.

If this parameter is not specified, the template specified at the confirmation or the default template is used.

<complete>
<template_id>123</template_id>
</complete>

Open pdf of a confirmation

GET /api/confirmations/{id}/pdf

At this point, the parameter format=pdf can also be used to open the PDF directly with MIME type “application/pdf”.
With the optional parameter type=print you can request the PDF without background. Note that the setting print_version must have been activated.

<pdf>
    <id type=&quot;integer&quot;>4882</id>
<created type=&quot;datetime&quot;>2009-09-02T12:04:15+02:00</created>
<confirmation_id type=&quot;integer&quot;>240</confirmation_id>
<filename>confirmation_123.pdf</filename>
<mimetype>application/pdf</mimetype>
<filesize>70137</filesize>
<base64file>{base64 encoded PDF}</base64file>
</pdf>

Send confirmation by e-mail

POST /api/confirmations/{id}/email
XML elementDescriptionTypeDefault valueMandatory
email_template_idID of the e-mail templateINT
fromSenderEMAILDefault email from the settings
recipientsRecipients of the e-mail. There must be at least one xml node for “to”, “cc” and/or “bcc”.XML node/EMAILja
subjectSubject of the e-mail (may include placeholders)ALNUMValue taken from the (default) e-mail template
bodyText of the e-mail (may include placeholders)ALNUMValue taken from the (default) e-mail template
filenameName of the PDF file (without .pdf)ALNUMinvoice_{id}
attachmentsFurther files. Attachments can contain as many nodes on the “attachment” with the elements “filename”, “mimetype” and “base64file”.XML node
<email>
<from>info@billomat.com</from>
<recipients>
<to>info@billomat.com</to>
<cc>mail@example.com</cc>
</recipients>
<subject>Bestätigung des Auftrags</subject>
<body>Dear sir or madam, ….</body>
<filename>Confirmation</filename>
<attachments>
<attachment>
<filename>drawing.pdf</filename>
<mimetype>application/pdf</mimetype>
<base64file>{base64 encoded file}</base64file>
</attachment>
</attachments>
</email>

Send confirmation by mail

POST /api/confirmations/{id}/mail

Sends a confirmation by mail. Pixelletter has to be configured as add on for usage.

XML elementDescriptionTypeDefault valueMandatory
colorDetermines whether to use color printing.BOOL0
duplexDetermines whether to use duplex printing.BOOL1
paper_weightDetermines the paper weight in grams. Possible values are 80 or 90.INT90
attachmentsFurther PDF files. Attachments can contain as many nodes on the “attachment” with the elements “filename”, “mimetype” and “base64file”.XML node
<mail>
<color>0</color>
    <duplex>1</duplex>
    <paper_weight>90</paper_weight>
    <attachments>
<attachment>
<filename>drawing.pdf</filename>
<mimetype>application/pdf</mimetype>
<base64file>{base64 encoded file}</base64file>
</attachment>
</attachments>
</mail>

Cancel confirmation

PUT /api/confirmations/{id}/cancel

Undo cancellation

PUT /api/confirmations/{id}/uncancel

Mark confirmationas cleared

PUT /api/confirmations/{id}/clear

Mark confirmationas uncleared

PUT /api/confirmations/{id}/unclear

Create Invoice from Order Confirmation

First, use the Preset function to retrieve a payload for the corresponding order confirmation (confirmation_id).

GET /api/invoices/preset?confirmation_id={id}

Pass the received payload to the invoice creation API:

POST /api/invoices

<invoice>
...
</invoice>