Aller au contenu principal

E-Invoicing Template

E-Invoicing Template

The e-invoicing template is a reserved system template that configures the connection to the Platform Agréée (PA), UBL validation asset paths, and the optional mock mode for testing.

Platform Agréée API

PropertyDescriptionExample
paApiBaseUrlBase URL of the PA REST APIhttps://api.myplatform.fr
paApiLoginEndpointLogin endpoint path (relative to base URL)/api/v1/auth/login
paApiUsernameUsername for PA authenticationmy_user
paApiPasswordPassword for PA authenticationmypassword
paApiImportEndpointEndpoint for submitting invoices/api/v1/sale/invoices/import
paModeSet to API to enable PA submission; leave empty to skipAPI
sendToPAY to send invoices, N to generate UBL only without sendingY

UBL validation paths

PropertyDescriptionExample
ublXsdPathPath to the UBL 2.1 XSD schema%APP_HOME%/validation/xsd/main/UBL-Invoice-2.1.xsd
ublSchematronPathPath to the EN16931 Schematron rules%APP_HOME%/validation/schematron/EN16931-UBL-validation-preprocessed.sch
ciusFrSchematronPathPath to the CIUS-FR Schematron rules%APP_HOME%/validation/schematron/BR-FR-Flux2-Schematron-UBL.sch
Bundled validation assets

If the paths are not set or not found on disk, NomaUBL falls back to bundled versions inside the JAR at validation/xsd/ and validation/schematron/.

Mock mode

Mock mode lets you test the full processing pipeline without connecting to a real Platform Agréée.

PropertyDescriptionValues
paUseMockEnable mock modetrue / false
paMockBehaviorControls what the mock returnsSUCCESS, PENDING, FAILED, ERROR
paMockBehavior valueSimulated PA response
SUCCESSReturns {"uuid": "mock-uuid", "status": "pending"} then transitions to success
PENDINGAlways returns status: pending
FAILEDReturns status: failed with sample errors
ERRORSimulates a network/HTTP error
"paUseMock": "true",
"paMockBehavior": "SUCCESS"

Authentication flow

NomaUBL uses TokenManager to manage JWT bearer tokens:

  1. On first API call, TokenManager calls paApiLoginEndpoint with paApiUsername / paApiPassword
  2. The token is cached for 55 minutes
  3. On HTTP 401, the token is refreshed once automatically before giving up
  4. On subsequent calls within the 55-minute window, the cached token is reused

FTP settings (optional)

If invoices need to be delivered via SFTP in addition to (or instead of) the REST API:

PropertyDescriptionExample
paFtpHostSFTP hostname for PA deliveryftp.myplatform.fr
paFtpUserSFTP usernamepa_user
paFtpPasswordSFTP password
paFtpPortSFTP port22
paFtpRemotePathRemote path where UBL files are deposited/inbox