Skip to content
Back to News
Changelog

SDK 4.3.0 + CLI 0.8.1 — read your own Peppol identity from the API

sdkcliapifeature

Until today, there was no way to ask the API the most basic question an integration has: is my Peppol identifier registered, and under which identity? Your own registration lived in the console only. The endpoint whose name suggested otherwise — /legal-entities — is the platform sub-tenant surface, requires a master key, and lists your customers, never your own company. Enough integrations hit that 403 while looking for their own identity that we built the missing door.

GET /v1/identity

Works with any API key, standard keys included, scoped to the environment of the key you call with — a sandbox key reads your sandbox identity, a production key your production identity.

{
  "environment": "sandbox",
  "legalEntity": {
    "companyName": "Bright Health Ltd",
    "country": "GB",
    "address": { "line1": "10 King Street", "city": "London", "zip": "EC2V 8EA" },
    "createdAt": "2026-08-01T09:00:00.000Z"
  },
  "identifiers": [
    { "scheme": "GB:VAT", "value": "gb123456789", "status": "verified", "createdAt": "2026-08-01T09:05:00.000Z" }
  ]
}

No identity in this environment yet is an answer, not an error: you get 200 with legalEntity: null, never a 404. Each identifier carries a status from the same public vocabulary the platform sub-tenant surface uses — one word that already accounts for network publication, so it cannot say verified while a send would still be refused for an unpublished identifier.

SDK: peppol.identity.get()

const me = await peppol.identity.get();
console.log(me.environment, me.legalEntity?.companyName);
for (const id of me.identifiers) {
  console.log(`${id.scheme}:${id.value}`, id.status);
}

The parser follows the same doctrine as the rest of the SDK: it refuses a corrupted response instead of inventing one. A missing legalEntity field raises PeppolProtocolError — only an explicit null means "no identity yet". The status field is type-guarded, never value-guarded: a status this SDK predates passes through unchanged, so compare against the values you know rather than matching exhaustively.

CLI: getpeppr whoami

$ getpeppr whoami
✓ Bright Health Ltd
  Environment  sandbox
  Country      United Kingdom (GB)
  ...
  1 Peppol identifier:
  GB:VAT:gb123456789   verified   2026-08-01T09:05:00Z

--prod, --local, --key and --json behave as on send and lookup. This is the command for the exact moment you are wondering whether your onboarding call actually worked.

A note on CLI 0.8.0

The 0.8.0 tarball reached the registry without its compiled code and is deprecated — installing it gives you no binary. 0.8.1 is the same release with the code included, and the package now carries the same publish guards as the SDK so this class of defect cannot recur.