Delivery Notes

List all delivery notes

GET /api/delivery-notes
<?xml version="1.0" encoding="UTF-8"?>
<delivery-notes type="array" page="1" per_page="100" total="2">
<delivery-note>
…
</delivery-note>
<delivery-note>
…
</delivery-note>
</delivery-notes>

You can filter the result by parameters:

GET /api/delivery-notes?delivery_note_number=LS123

Lists all delivery notes with “LS123” in the delivery note number. Upper and lower case are ignored.
The following filter parameters are available:

ParameterDescription
client_idID of the client
contact_idID of the contact
delivery_note_numberDelivery note number
statusStatus (DRAFT, CREATED). More than one statuses could be given as a comma separated list. Theses statuses will be logically OR-connected.
fromOnly show delivery notes since this date (format YYYY-MM-DD)
toOnly show delivery notes 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 delivery note

GET /api/delivery-notes/{id}
<?xml version="1.0" encoding="UTF-8"?>
<delivery-note>
<id type="integer">1</id>
<client_id type="integer">123</client_id>
<contact_id type="integer"></contact_id>
<created type="datetime">2007-12-13T12:12:00+01:00</created>
<delivery_note_number>GS123</delivery_note_number>
<number type="integer">123</number>
<number_pre>LS</number_pre>
<number_length type="integer">0</number_length>
<status>CREATED</status>
<date type="date">2009-10-14</date>

<address>Billomat GmbH & Co. KG
Hollertszug 26
57562 Herdorf
Deutschland</address>    <title></title>
<label>project 123</label>
<intro>Dear sir or madam,…</intro>
<note>Thank you!</note>
<customerportal_url>https://mybillomatid.billomat.net/customerportal/deliverynotes/show/entityId/123?hash=123456789aabbcc</customerportal_url>
<offer_id></offer_id>
<confirmation_id>7</confirmation_id>
<invoice_id></invoice_id>
<template_id></template_id>
</delivery-note>

status can have the following values:

  • DRAFT
  • CREATED
    Delivery note items and comments can be accessed separately.

Create delivery note

POST /api/delivery-notes
XML elementDescriptionTypeDefault valueMandatory
client_idID of the clientINTyes
contact_idID of the contactINT
addressthe delivery addressALNUMAddress of the customer
number_prePrefixALNUMValue taken from the settings.
numberserial numberINTnext free number
number_lengthMinimum length of the delivery note number (to be filled with leading zeros)INTValue taken from the settings.
dateDate of deliveryDATEtoday
titleTitle of the documentALNUM
labelLabel text to describe the projectALNUM
introIntroductory textALNUMValue taken from the settings.
noteExplanatory notestALNUMValue taken from the settings.
offer_idThe ID of the estimate, if the delivery note was created from an estimate.INT
confirmation_idThe ID of the confirmation, if the delivery note was created from a confirmation.INT
invoice_idThe ID of the invoice, if the delivery note was created from an invoice.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 delivery note.INTID of the default template

status at creation is always DRAFT.

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


Delivery note items (delivery-note-items) can be specified directly at creation. Please find a documentation of the XML elements at Create delivery note items, but the XML element invoice_id need not be specified with.

<delivery-note>
<client_id>1</client_id>
<date>2009-11-18</date>
<note>Dear sir or madam,…:</note>
<delivery-note-items>
<delivery-note-item>
<unit>Piece</unit>
<quantity>1.5</quantity>
<title>Pattern</title>
</delivery-note-item>
<delivery-note-item>
<unit>Hour</unit>
<quantity>8</quantity>
<title>Working</title>
</delivery-note-item>
</delivery-note-items>
</delivery-note>
<?xml version="1.0" encoding="UTF-8"?>
<delivery-note>
<id type="integer">1234</id>
<client_id type="integer">1</client_id>
<created type="datetime">2007-12-13T12:12:00+01:00</created>
<delivery_note_number>LS124</delivery_note_number>
<number type="integer">124</number>
<number_pre>LS</number_pre>
<number_length type="integer">0</number_length>
<date type="date">2009-11-18</date>
…
</delivery-note>

Edit delivery note

PUT /api/delivery-notes/{id}

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

<delivery-note>
<date>2009-10-13</date>
</delivery-note>

Delete delivery note

DELETE /api/delivery-notes/{id}

Deletes an invoice with all documents (PDFs), items and comments.

Complete delivery note

PUT /api/delivery-notes/{id}/complete

Completes a delivery note in the draft status (DRAFT). Here, the status of created (CREATED) 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 delivery note or the default template is used.

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

Open pdf of a delivery note

GET /api/delivery-notes/{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="integer">4882</id>
<created type="datetime">2009-09-02T12:04:15+02:00</created>
<delivery_note_id type="integer">240</delivery_note_id>
<filename>delivery-note_123.pdf</filename>
<mimetype>application/pdf</mimetype>
<filesize>70137</filesize>
<base64file>{base64 encoded PDF}</base64file>
</pdf>

Send delivery note by e-mail

POST /api/delivery-notes/{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>Your invoice</subject>
<body>Dear sir or madam, ….</body>
<filename>delivery_note</filename>
<attachments>
<attachment>
<filename>drawing.pdf</filename>
<mimetype>application/pdf</mimetype>
<base64file>{base64 encoded file}</base64file>
</attachment>
</attachments>
</email>

Send delivery note by mail

POST /api/delivery-notes/{id}/mail

Sends a delivery note 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>