generate_invoice_sg
Generate Singapore e-invoice UBL 2.1 XML from structured invoice data, returning the applied customization and profile IDs for PINT-SG or Peppol BIS Billing 3.0.
Instructions
Build an SGInvoice from structured data and serialize it to UBL 2.1 XML.
invoice_data['profile'] (CustomizationID) and invoice_data['business_process']
(ProfileID) select PINT-SG or SG Peppol BIS Billing 3.0, and must be a
matched pair (TX2_Annex Annex B) — use get_profile_urn_sg to look up
both values together rather than setting them independently.
Returns the UBL XML (as a string) plus the customization_id/profile_id
that were applied. Does not validate against Schematron — call
validate_invoice_sg on the returned XML for that.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| invoice_data | Yes | Invoice fields matching the SGInvoice schema (see get_profile_urn_sg for the profile URN to set). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||