Skip to content
HALOWERK

Formatwerk

din5008 letter

Typesets the letter with pdf-lib and embedded Liberation Sans (or a PDF base font). Positions come from cited sources and are returned with their source: letterhead 27/45 mm, address field 20 mm from left, 85 mm wide, 5 + 40 mm, reference line 8.5 mm below with tabs 50.8/50.8/36.0/14.8 mm, fold marks 87/192 or 105/210 mm, punch mark 148.5 mm (Bavarian AGO annexes 1-2); alignment line 25 mm, 9 address lines, 8 pt return address, 2 blank lines after the subject (Wikipedia DIN 5008, CC BY-SA)..

POST https://format.halowerk.com/v1/din5008-letter

Inputs

Fields of the published input schema
FieldTypeRequiredDescription
formstringNoA: 27 mm letterhead, B: 45 mm.
languagestringNo
senderobjectNo
return_addressstringNo
endorsementarrayNoe.g. Einschreiben
recipientarrayYesAddress lines, no empty lines.
referencesobjectNo
datestringNo
date_formatstringNo
subjectstringNo
salutationstringNo
closingstringNo
bodySee schemaYesParagraphs.
signatureobjectNo
signature_space_linesintegerNo
enclosuresarrayNo
copiesarrayNo
footerarrayNoBusiness details, up to 4 columns.
fontstringNoBase fonts: WinAnsi only.
font_size_ptnumberNo
right_margin_mmnumberNo
bottom_margin_mmnumberNo
fold_marksbooleanNo
punch_markbooleanNo
logo_base64stringNoPNG/JPEG logo.
Show full input schema
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "recipient",
    "body"
  ],
  "properties": {
    "form": {
      "type": "string",
      "enum": [
        "A",
        "B"
      ],
      "default": "B",
      "description": "A: 27 mm letterhead, B: 45 mm."
    },
    "language": {
      "type": "string",
      "enum": [
        "de",
        "en"
      ],
      "default": "de"
    },
    "sender": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "street": {
          "type": "string",
          "maxLength": 80
        },
        "postal_code": {
          "type": "string",
          "maxLength": 80
        },
        "city": {
          "type": "string",
          "maxLength": 80
        },
        "country": {
          "type": "string",
          "maxLength": 80
        },
        "phone": {
          "type": "string",
          "maxLength": 80
        },
        "email": {
          "type": "string",
          "maxLength": 80
        },
        "web": {
          "type": "string",
          "maxLength": 80
        }
      }
    },
    "return_address": {
      "type": "string",
      "maxLength": 120
    },
    "endorsement": {
      "type": "array",
      "maxItems": 3,
      "items": {
        "type": "string",
        "maxLength": 60
      },
      "description": "e.g. Einschreiben"
    },
    "recipient": {
      "type": "array",
      "minItems": 1,
      "maxItems": 6,
      "items": {
        "type": "string",
        "maxLength": 80
      },
      "description": "Address lines, no empty lines."
    },
    "references": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "your_reference": {
          "type": "string",
          "maxLength": 60
        },
        "our_reference": {
          "type": "string",
          "maxLength": 60
        },
        "contact": {
          "type": "string",
          "maxLength": 60
        }
      }
    },
    "date": {
      "type": "string",
      "format": "date"
    },
    "date_format": {
      "type": "string",
      "enum": [
        "numeric",
        "iso",
        "long"
      ]
    },
    "subject": {
      "type": "string",
      "maxLength": 300
    },
    "salutation": {
      "type": "string",
      "maxLength": 120
    },
    "closing": {
      "type": "string",
      "maxLength": 120
    },
    "body": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1,
          "maxLength": 30000
        },
        {
          "type": "array",
          "minItems": 1,
          "maxItems": 200,
          "items": {
            "type": "string",
            "maxLength": 5000
          }
        }
      ],
      "description": "Paragraphs."
    },
    "signature": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "company": {
          "type": "string",
          "maxLength": 80
        },
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "title": {
          "type": "string",
          "maxLength": 80
        }
      }
    },
    "signature_space_lines": {
      "type": "integer",
      "minimum": 0,
      "maximum": 6
    },
    "enclosures": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "maxLength": 120
      }
    },
    "copies": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "string",
        "maxLength": 120
      }
    },
    "footer": {
      "type": "array",
      "maxItems": 4,
      "items": {
        "type": "array",
        "maxItems": 5,
        "items": {
          "type": "string",
          "maxLength": 60
        }
      },
      "description": "Business details, up to 4 columns."
    },
    "font": {
      "type": "string",
      "enum": [
        "Liberation Sans",
        "Helvetica",
        "Times",
        "Courier"
      ],
      "description": "Base fonts: WinAnsi only."
    },
    "font_size_pt": {
      "type": "number",
      "minimum": 10,
      "maximum": 12
    },
    "right_margin_mm": {
      "type": "number",
      "minimum": 10,
      "maximum": 40
    },
    "bottom_margin_mm": {
      "type": "number",
      "minimum": 10,
      "maximum": 40
    },
    "fold_marks": {
      "type": "boolean"
    },
    "punch_mark": {
      "type": "boolean"
    },
    "logo_base64": {
      "type": "string",
      "maxLength": 2800000,
      "description": "PNG/JPEG logo."
    }
  }
}

Open original schema

Published input example

{
  "form": "B",
  "sender": {
    "name": "Lagertechnik Nord GmbH",
    "street": "Hallenweg 3",
    "postal_code": "48599",
    "city": "Gronau"
  },
  "recipient": [
    "Beispiel AG",
    "Hauptstraße 5",
    "10115 Berlin"
  ],
  "date": "2026-11-01",
  "subject": "Angebot",
  "salutation": "Sehr geehrte Damen und Herren,",
  "body": [
    "vielen Dank für Ihre Anfrage."
  ],
  "closing": "Mit freundlichen Grüßen",
  "signature": {
    "name": "Einkaufsteam Nord"
  }
}

Result & documentation

Machine-readable documentation of this hub

Source of this page: the published HALOWERK catalog. Updated: 2026-11-17 UTC.

More endpoints in this hub

All endpoints in this hub →