{
  "info": {
    "name": "NormAPI",
    "description": "Generate and validate German e-invoices (XRechnung, ZUGFeRD).\n\nSet the `apiKey` variable to your key from https://normapi.de/konto. Validation also works without one, under anonymous rate limits.\n\nEvery response carries the rule set version in `X-Normapi-Ruleset`.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "variable": [
    { "key": "baseUrl", "value": "https://api.normapi.de" },
    { "key": "apiKey", "value": "nk_live_…", "type": "string" }
  ],
  "auth": {
    "type": "bearer",
    "bearer": [{ "key": "token", "value": "{{apiKey}}", "type": "string" }]
  },
  "item": [
    {
      "name": "Validate an invoice (XML)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/xml" }],
        "url": { "raw": "{{baseUrl}}/v1/validate", "host": ["{{baseUrl}}"], "path": ["v1", "validate"] },
        "body": {
          "mode": "file",
          "file": { "src": "rechnung.xml" }
        },
        "description": "Free and unlimited on every plan. Point the body at an XRechnung file (UBL or CII); for a ZUGFeRD PDF send Content-Type: application/pdf instead."
      }
    },
    {
      "name": "Generate an invoice (UBL)",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{baseUrl}}/v1/invoices?syntax=ubl",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "invoices"],
          "query": [{ "key": "syntax", "value": "ubl", "description": "ubl | cii | zugferd" }]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"invoiceNumber\": \"2027-0042\",\n  \"issueDate\": \"2027-01-15\",\n  \"dueDate\": \"2027-02-14\",\n  \"currency\": \"EUR\",\n  \"buyerReference\": \"04011000-1234-56\",\n  \"seller\": {\n    \"name\": \"Muster GmbH\",\n    \"vatId\": \"DE123456789\",\n    \"electronicAddress\": \"rechnung@muster.de\",\n    \"electronicAddressScheme\": \"EM\",\n    \"address\": { \"street\": \"Musterweg 1\", \"city\": \"Berlin\", \"postcode\": \"10115\", \"country\": \"DE\" },\n    \"contact\": { \"name\": \"Anna Muster\", \"phone\": \"+49 30 123456\", \"email\": \"anna@muster.de\" }\n  },\n  \"buyer\": {\n    \"name\": \"Beispiel AG\",\n    \"electronicAddress\": \"eingang@beispiel.de\",\n    \"electronicAddressScheme\": \"EM\",\n    \"address\": { \"street\": \"Beispielallee 2\", \"city\": \"Hamburg\", \"postcode\": \"20095\", \"country\": \"DE\" }\n  },\n  \"payment\": { \"meansCode\": \"58\", \"iban\": \"DE02120300000000202051\" },\n  \"paymentTerms\": \"Zahlbar innerhalb von 30 Tagen.\",\n  \"lines\": [\n    { \"name\": \"Beratung\", \"quantity\": 8, \"unit\": \"HUR\", \"unitPrice\": 120.0, \"vatCategory\": \"S\", \"vatRate\": 19 }\n  ]\n}"
        },
        "description": "Counts against the monthly allowance. The result is validated before it is returned, so a 200 means it passes the rule set. A 422 means the data describes an invoice the rules do not permit — and costs nothing."
      }
    },
    {
      "name": "Generate a ZUGFeRD PDF",
      "request": {
        "method": "POST",
        "header": [{ "key": "Content-Type", "value": "application/json" }],
        "url": {
          "raw": "{{baseUrl}}/v1/invoices?syntax=zugferd",
          "host": ["{{baseUrl}}"],
          "path": ["v1", "invoices"],
          "query": [{ "key": "syntax", "value": "zugferd" }]
        },
        "body": {
          "mode": "raw",
          "raw": "{\n  \"invoiceNumber\": \"2027-0043\",\n  \"issueDate\": \"2027-01-15\",\n  \"currency\": \"EUR\",\n  \"buyerReference\": \"04011000-1234-56\",\n  \"seller\": { \"name\": \"Muster GmbH\", \"vatId\": \"DE123456789\" },\n  \"buyer\": { \"name\": \"Beispiel AG\" },\n  \"payment\": { \"meansCode\": \"58\", \"iban\": \"DE02120300000000202051\" },\n  \"lines\": [\n    { \"name\": \"Beratung\", \"quantity\": 1, \"unit\": \"C62\", \"unitPrice\": 100.0, \"vatCategory\": \"S\", \"vatRate\": 19 }\n  ]\n}"
        },
        "description": "A hybrid: a readable PDF with the CII invoice embedded. Save the response to a .pdf file."
      }
    }
  ]
}
