Das Letter-Objekt bildet den Grund-Baustein für die Übermittlung von Briefen über die API Schnittstelle. Viele der Felder sind dabei optional und müssen nicht ausgefüllt und mitgeschickt werden.
"letter": {
"base64_file": "(string)",
"base64_file_checksum": "(string)", // md5 from base64 string
"specification": {
"color": "(string)", // 1 - black/white, 4 - color
"mode": "(string)", // simplex, duplex
"shipping": "(string)", // national, international, auto
"c4": (number) // 0, 1 - optional, for C4 envelope under 9 sheets
},
// optional for print jobs
// A file name can also be transferred with the request.
// When retrieving jobs via the API, the file name is also returned.
"filename_original": "(string)", // i.e. Rechnung-123456.pdf
// optional
// Important! Registered mail can be sent nationally for both types of
//registered letters or internationally only for r2 registered letters.
// r1 - Einschreiben Einwurf
// r2 - Einschreiben
"registered": "(string)", // r1, r2
// optional
// Important! Dispatch day must be in the future.
"dispatch_date": "(string)", // yyyy-mm-dd Format
// optional
// If the separator type is "string", then a keyword is expected as
// the separator value, which is used to separate the individual letters.
// If the separator type is "number", then a number is expected as the
// separator value. The serial letter is then broken down into individual
// letters after this number of pages.
"serial_letter": {
"pages_separator_type": "(string)", // string, number
"pages_separator_value": "(string)|(number)" // keyword or number of pages
},
// optional
// Multiple attachments can be added to a letter. The order of the
// attachments in the letter depends on the order of the attachments
// in the request.
// The attachments must be created as a PDF in A4 portrait format
// (29.7 x 21.0 cm) and converted to a base64 string.
"base64_attachments": ["(string)", "(string)", ...],
// optional
// The letter background must be created as a PDF in A4 portrait format
// (29.7 x 21.0 cm) and consist of one page. With a serial letter, the
// background is inserted on each individual letter after the selection made.
"backgrounds": {
"base64_background_first_page": "(string)",
"base64_background_other_pages": "(string)"
},
// optional
// The terms and conditions must be created as a PDF in A4 portrait
// format (29.7 x 21.0 cm) and consist of one page. They can either be
// inserted behind the 1st page or behind all pages of a letter.
// Printing is automatically double-sided (duplex). If the terms and conditions
// are only inserted behind the first page, blank pages will be inserted
// behind all subsequent pages. With a serial letter, the terms and
// conditions are added to each individual letter according to the rules
// that have been set.
"terms_and_conditions": {
"base64_terms": "(string)", // PDF format
"terms_on_all_pages": (number) // 0, 1
},
// optional
// The bank transfer form is always attached as the last sheet of a letter.
"bank_form": {
// Payment details are printed on the last sheet.
// This sheet must be blank except for the payment details.
"bank_form_included": (number), // 0, 1
// This information is ignored if "bank_form_included" is set to 1
"payee": "(string)", // max. 27 characters
"iban": "(string)", // max. 34 characters
"bic": "(string)", // max. 11 characters
"amount": "(string)", // max. 12 characters
"purpose_of_payment": "(string)", // max. 27 characters
"purpose_of_payment2": "(string)" // max. 27 characters
},
// optional
// This field can contain any information. The data is stored in the
// database for a certain period of time and can be called up again
// via API or in the customer area.
"notice": "(string)" // max. 255 characters
// optional
"cost_unit": "(string)" // max. 255 characters
}
"letter": {
"base64_file": "(string)", // file encoded in base64 format
"base64_file_checksum": "(string)", // checksum from base64 encoded string
"specification": {
"color": "(string)", // 1 - black/white, 4 - color
"mode": "(string)", // simplex, duplex
"shipping": "(string)" // national, international, auto
}
}