Two releases reach npm today. Neither changes a signature you already call.
The recipient check asks the network, not the Directory
validateRecipient (SDK) and the x-validate-recipient header (API) now ask
the SML, the registry every access point routes by, on your key's network: the
Peppol test network for a sandbox key, the production network for a live key.
They used to read the public Peppol Directory, which can lag the network by a
day, so strict could refuse a recipient that was reachable. That change is on
the API side and has been live since 5 November; no upgrade is needed for it.
Only a proven absence counts. If the SML cannot be read, the invoice is sent and no warning is added. Registration does not prove the recipient accepts invoices: that failure still arrives later, after the send. The details are on the send an invoice page.
SDK 6.5.0 no longer drops the gateway's warnings
When the SDK's local validator produced any advisory (a missing buyer
reference, for example), invoices.send() replaced result.warnings with
those advisories and discarded what the API had returned. With
validateRecipient: "warn", that meant the recipient_not_on_network warning
never reached your code. result.warnings now lists the API's warnings first,
then the local ones.
const result = await peppol.invoices.send(invoice, { validateRecipient: "warn" });
for (const warning of result.warnings ?? []) {
if (warning.ruleId === "recipient_not_on_network") {
// the SML had no record for the recipient when the invoice was sent
}
}
6.5.0 also types the blocked variant of sandboxFirstSend that
GET /v1/identity returns when a sandbox sender does not meet its country's
identity rule yet (code national_identifier_required), with its rule,
docs, schemes and identityPage members. The API already returns this
profile; until now the published types did not describe it.
CLI 0.15.0: getpeppr send --validate-recipient
getpeppr send invoice.json --prod --validate-recipient strict
strict refuses an unregistered recipient: nothing is sent and the command
exits 1 with the API's message. In the sandbox it prints:
✗ getpeppr API error (422): Recipient 0208:0987654398 is not registered on the Peppol test network: the SML has no record for it, so no access point can deliver to it. Nothing was sent. Check the identifier with the recipient.
warn submits anyway and prints the warning when the recipient has no record
(not with --quiet). The provider may still refuse an unroutable recipient: in
the sandbox, such a send fails with 422 provider.rejected and exits 1.
Any other value exits 2 before anything is sent. Without the flag, send
behaves as before.
0.15.0 also carries SDK 6.5.0. The previous CLI embedded SDK 6.3.0, so the 6.4.0 changes reach the CLI with this release too.