NordInvoice / Guides / Generate UBL from JSON
Generate UBL invoices from JSON
UBL is XML with a few thousand pages of context. If you only need a compliant document, send plain JSON and let the API produce the UBL: validated, ready to store, email or deliver later.
One call
curl -X POST "https://nordinvoice.com/api/generate?profile=peppol-invoice" \
-H "Authorization: Bearer nord_test_..." \
-H "Content-Type: application/json" \
-d @draft.json
The draft is the same friendly shape as in the sending guide: parties, lines, payment details. The response contains the UBL XML and the validation outcome.
Credit notes included
// npm install nordinvoice
const creditNote = await nord.generate(draft, 'peppol-creditnote')
# pip install nordinvoice
credit_note = nord.generate(draft, profile="peppol-creditnote")
Generate now, send later
Generation does not deliver anything. Many teams generate and archive UBL during their billing run, then deliver selected documents over Peppol with the invoices endpoint when the buyer is registered on the network.
Try the generator in the browser