API-referens

The API of the Peppol portal: create, validate, send and receive invoices and credit notes over the Peppol network.

Signing in. A program signs in with an API key as Authorization: Bearer ppk_…. A company's key, created under the company's settings, is for that company alone, so the paths here name none. An account key, created under the account, acts as the person: it reaches every company of theirs under /v1/companies/{companyId} and may add companies. A person signed in to the portal reaches the operations the same way.

Documents are given and answered in JSON modelled on EN 16931, the European standard for e-invoices; the field descriptions name the standard's terms (BT-1 and so on). Amounts are numbers with the decimals they have. The portal writes the UBL, computes the totals and checks the document against the same rules the network applies.

Errors are answered as application/problem+json: code is for programs, detail for people, and field names the field at fault where there is one.

Limits. An API key is answered a few hundred times a minute, and an address that calls what needs no key somewhat less. Every answer says what is left in RateLimit-Remaining; a request too many is answered 429 with Retry-After.

Webhooks tell of what happens to documents. Every delivery is signed: the X-Portal-Signature header holds t=<unix time>,v1=<signature>, where the signature is the HMAC-SHA256, in hex, of <unix time>.<body> under the webhook's secret. Answer with a 2xx status within ten seconds; a delivery that fails is tried again after 1, 5 and 15 minutes.

Beskrivningen finns också som OpenAPI 3.1, för verktyg som genererar klienter.

Documents

Invoices and credit notes: drafts, what has been sent, and what has been received.

List documents

A page of the company's documents. A page may hold fewer documents than asked for and still have a nextCursor; the listing ends when there is none.

Parametrar

directioni fråganOnly documents inbound (received) or outbound (the company's own).
statei fråganOnly documents in this state. Several are given with commas between them, or by repeating the parameter.
typei fråganOnly documents of this type, such as INVOICE or CREDIT_NOTE.
fromi fråganOnly documents issued on this date or later, as YYYY-MM-DD.
toi fråganOnly documents issued on this date or earlier, as YYYY-MM-DD.
qi fråganOnly documents with this in their number, or in the other party's name or Peppol ID. Case is ignored.
orderi frågandesc, the default, lists the newest first; asc the oldest.
limiti fråganHow many documents to answer with, at most 100. 50 when left out.
cursori fråganThe nextCursor of the page before, to continue after it.

Svar 200

application/json
documentslista av DocumentSummary
nextCursorstring

Create a draft

Stores the document as a draft. A draft may have errors: they are listed in validation and stop it from being sent, not from being saved. Files given in attachments[].content are taken out of the document and kept beside it.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 201

application/json
documentDocument

Get a document

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
documentDocument

Replace a draft

Replaces what a draft says. Its files stay as they are.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 200

application/json
documentDocument

Delete a draft

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 204

Inget innehåll.

Attach a file to a draft

The body is the file, at most 4 MB, and Content-Type its type: PDF, PNG, JPEG, CSV, XLSX or ODS. A larger file is uploaded in two steps.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
filenamei fråganThe file's name.
descriptioni fråganWhat the file is, for the receiver to read.

Innehåll i förfrågan

application/pdfstringThe file.

Svar 201

application/json
documentDocument

Download an attachment

The file of the attachment with this index in the document's attachments. A file above 4 MB is answered with a redirect (303) to where it can be fetched.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
ni sökvägenThe attachment's index in the document's attachments.

Svar 200

application/octet-streamstringThe file.

Remove an attachment from a draft

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
ni sökvägenThe attachment's index in the document's attachments.

Svar 200

application/json
documentDocument

Start uploading a large file

Answers with a URL to PUT the file to, with exactly the headers given and the size stated. Once it is there, finish the upload.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonFileUpload

Svar 201

application/json
expiresAtstring (date-time)
fileIdstring
headersobjekt med string per nyckel
uploadUrlstring

Finish uploading a large file

Attaches the uploaded file to the draft. What was uploaded is checked like any other file, and thrown away if refused.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
fileIdi sökvägenThe fileId the upload was started with.

Innehåll i förfrågan

application/jsonFileUpload

Svar 201

application/json
documentDocument

Create a credit note for a sent invoice

Creates a draft credit note with the invoice's parties and lines, referring to the invoice. Its number is left to give.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 201

application/json
documentDocument

Get a document in another format

The document written as cii (UN/CEFACT CII D16B in the EN 16931 profile, which Factur-X and ZUGFeRD take), xrechnung (the same with XRechnung 3.0's guideline, for German public buyers) or factur-x (a PDF/A-3 with the pages drawn and the CII inside, Factur-X 1.0 / ZUGFeRD 2 at the EN 16931 level). The amounts are the ones the UBL carries.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
formati sökvägencii, xrechnung or factur-x.
langi fråganThe language of the pages of a Factur-X: sv, en, de, fr, nl, da, nb, fi, it or es. The company's language when left out.

Svar 200

application/xmlstringThe document in the format asked for; a Factur-X as application/pdf.

Mail a received document on

Mails a received document, now, to the addresses given or else to the company's forwarding addresses: the pages drawn as PDF, the XML, the files inside it, and what looked wrong. For sending it on again, or to someone else, after the fact; the forwarding the company has set up happens by itself when a document arrives. The timeline records it.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonForwardRequest

Svar 200

application/json
documentDocument

Get a document as PDF

The document drawn as pages to read. The pages are a view of the e-invoice; the XML is the original.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
langi frågansv, en, de, fr, nl, da, nb, fi, it or es. The company's language when left out: the one it has chosen in its settings, else its country's.

Svar 200

application/pdfstringThe document as pages.

Make a failed document a draft again

Turns a document that is failed or invalid back into a draft, to be changed and sent again. What the failed send carried stays in the archive, and the timeline records it.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
documentDocument

Answer a received document

Sends a Peppol Invoice Response to whoever sent the document: AB acknowledged, IP in process, UQ under query, CA conditionally accepted, RE rejected, AP accepted or PD paid. A query, a condition or a rejection must give a reasonCode (OPStatusReason: REF, LEG, REC, QUA, DEL, PRI, QTY, ITM, PAY, UNR, FIN, PPD, OTH). The document records what was said in response. A response about a document the company sent arrives the other way, as the document.response event.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonResponseInput

Svar 200

application/json
documentDocument

Send a failed document again

Sends a document that is failed or invalid again, as it is, as a new message: the checks of a send are made again, and the answer is as for sending a draft. A document that is still not right to send is left a draft (the error says why), to be changed and sent. What the failed send carried stays in the archive.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 202

application/json
documentDocument

Send a draft

Checks the draft against the Peppol rules and queues it for sending. The answer comes at once; the document then goes from queued to delivered, unconfirmed, invalid or failed, which a webhook tells of.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 202

application/json
documentDocument

Get a document as UBL

The XML that was sent or received, or that a draft would be sent as. A document above 4 MB is answered with a redirect (303) to where it can be fetched.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/xmlstringA UBL 2.1 Invoice or CreditNote.

Validate a stored document

Asks the Peppol rules about a stored document, without sending it. What they say is in findings.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
documentDocument

Preview a document

Answers with what saving the document would show, its totals and its errors, without saving it or asking the Peppol rules.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 200

application/json
documentDocument

Create a draft from a file

Stores a finished invoice or credit note, such as an export from a business system, as a draft. UBL (Peppol BIS Billing, XRechnung UBL and other EN 16931 UBL) is sent exactly as given. CII (XRechnung CII, ZUGFeRD and Factur-X XML), a Factur-X or ZUGFeRD PDF, and FatturaPA are read into the document model, become drafts like any written here, and are sent as Peppol BIS Billing; the answer's validation says what they lack, such as the receiver's Peppol ID.

Innehåll i förfrågan

application/xmlstringA UBL 2.1 Invoice or CreditNote, a CII CrossIndustryInvoice, a FatturaPA document, or (as application/pdf) a Factur-X or ZUGFeRD PDF.

Svar 201

application/json
documentDocument

List exports

The company's exports of the last seven days, newest first.

Svar 200

application/json
exportslista av Export

Export the archive

Writes the company's documents out as zip files, for it to keep: a folder per document with its XML as sent or received, what earlier failed sends of it carried, its pages as PDF when pdf is asked for, and its files, with index.csv and index.json listing every document and its timeline. Every document but drafts, unless narrowed by direction and issue date. The answer comes at once; the export is ready when its parts are written. A large archive comes in several parts. Exports are kept for seven days.

Innehåll i förfrågan

application/jsonExportInput

Svar 202

application/json
exportExport

Get an export

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
exportExport

Download a part of an export

The n'th zip file of a ready export, counting from 1; most often by a redirect to where it is kept.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.
ni sökvägenThe attachment's index in the document's attachments.

Svar 200

application/zipstringA zip file of documents.

List imports

Svar 200

application/json
importslista av Import

Make drafts from a file

Makes drafts from a file sent as the body, of its own Content-Type: a spreadsheet of invoices (CSV or Excel; see the template at /tools/import-template/{format}), an invoice as pages (a PDF without an e-invoice inside, or a photo or scan, read by a model, each draft saying it is to be checked and what was unclear), or an e-invoice in any format the portal reads. The answer comes at once; the import is done when its drafts are made, with their ids in documents and what could not be read in problems, by row. A file over 5 MB is put to a link from /imports/uploads first and named here by upload.

Parametrar

filenamei fråganThe file's name, which tells a CSV file by its extension.
uploadi fråganThe uploadId of a file put to a link from /imports/uploads, in place of a body.
contentTypei fråganWith upload: the file's content type.

Innehåll i förfrågan

application/octet-streamstringThe file: CSV, .xlsx, PDF, PNG, JPEG, WebP, GIF, or XML (UBL, CII, FatturaPA).

Svar 202

application/json
importImport

Get an import

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
importImport

Get a link to put a large file to

For a file over 5 MB, up to 20 MB: put it to uploadUrl with the headers given, then make the drafts with POST /imports?upload={uploadId}.

Innehåll i förfrågan

application/jsonImportUploadRequest

Svar 201

application/json
expiresAtstring
headersobjekt med string per nyckel
uploadIdstring
uploadUrlstring

Receive a test document

For a sandbox company: delivers the UBL in the body, or a sample invoice when the body is empty, as if it had arrived over Peppol.

Innehåll i förfrågan

application/xmlstringA UBL 2.1 Invoice or CreditNote, or nothing.

Svar 201

application/json
documentDocument

Validation

What the Peppol rules say about a document, without storing or sending it.

Validate a document given as JSON

Answers with the document's field errors and totals and, if it has no field errors, what the Peppol rules say about it and the document as UBL. Nothing is stored or sent.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 200

application/jsonValidation

Validate a document given as a file

Answers with what the Peppol rules say about a UBL invoice or credit note, whoever it is from. A CII, Factur-X, ZUGFeRD or FatturaPA document is read into the document model first and judged as the Peppol BIS Billing it would be sent as. Nothing is stored or sent.

Innehåll i förfrågan

application/xmlstringA UBL 2.1 Invoice or CreditNote, a CII CrossIndustryInvoice, a FatturaPA document, or (as application/pdf) a Factur-X or ZUGFeRD PDF.

Svar 200

application/jsonValidation

Peppol directory

Who is on the Peppol network, and what they receive.

get/v1/participantsKräver ingen nyckel

Search the Peppol directory

Parametrar

qi fråganA Peppol ID (0007:5561234567), a national number, or part of a name.

Svar 200

application/json
participantslista av Participant
get/v1/participants/{peppolId}Kräver ingen nyckel

Look up a Peppol ID

Whether anything is registered under the ID, and what it receives.

Parametrar

peppolIdi sökvägenA Peppol ID, as scheme:value, such as 0007:5561234567.

Svar 200

application/json
participantParticipant
get/v1/participants/by-vat/{number}Kräver ingen nyckel

Find a participant by VAT number

The Peppol IDs the VAT number may go by (the country's VAT scheme, and its register where the register number can be read off the VAT number) are tried in turn; participant is the first that is registered, or null, and tried lists them all.

Parametrar

numberi sökvägenAn EU VAT number, such as SE556123456701.

Svar 200

application/json
participantParticipant
triedlista av string

List the parties waited for

The parties the company waits for on the Peppol network, found or not.

Svar 200

application/json
watcheslista av Watch

Wait for a party to join Peppol

Puts a watch on a Peppol ID. The network is asked daily; when the party is registered, the webhooks get a participant.registered event and email, if given, a mail. A party registered already is answered with 409 ALREADY_REGISTERED and the participant: there is nothing to wait for. Watching an ID watched already answers with the watch there is.

Innehåll i förfrågan

application/jsonWatchRequest

Svar 201

application/json
watchWatch

Get a watch

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
watchWatch

Stop waiting for a party

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 204

Inget innehåll.

Ask the network about a watched party now

Asks the Peppol directory now instead of waiting for the daily sweep, and tells the company the same way if the party has appeared.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
watchWatch

Webhooks

Where the company is told of what happens to its documents.

List webhooks

Svar 200

application/json
eventslista av string
webhookslista av Webhook

Create a webhook

Innehåll i förfrågan

application/jsonWebhookRequest

Svar 201

application/json
webhookWebhook

Get a webhook

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
webhookWebhook

Replace a webhook

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonWebhookRequest

Svar 200

application/json
webhookWebhook

Delete a webhook

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 204

Inget innehåll.

List a webhook's latest deliveries

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
deliverieslista av WebhookDelivery

Deliver a test event

Delivers a webhook.test event now and answers with how it went.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json

Companies

The companies of the person signed in, their settings, API keys and usage.

What was done to the company

Every change made to the company and its documents, keys, webhooks and settings, through the API or the web app, newest first: what was done, to what, by whom (a person, by their user id, or an API key, by its id), and from where. Reading is not recorded. nextCursor continues the list.

Parametrar

limiti fråganHow many, at most 200; 50 when left out.
cursori fråganContinue after an earlier page, from its nextCursor.

Svar 200

application/json
entrieslista av AuditEntry
nextCursorstring

Add a company

Registers the company on the Peppol network, to send and to receive. Not for API keys.

Innehåll i förfrågan

application/jsonCompanyRequest

Svar 201

application/json
companyCompany

List API keys

Not for API keys.

Parametrar

companyIdi sökvägenThe company's id.

Svar 200

application/json
apiKeyslista av ApiKey

Create an API key

The key itself is in the answer, and nowhere after it. Not for API keys.

Parametrar

companyIdi sökvägenThe company's id.

Innehåll i förfrågan

application/jsonApiKeyRequest

Svar 201

application/json
apiKeyApiKey

Revoke an API key

Parametrar

companyIdi sökvägenThe company's id.
idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 204

Inget innehåll.

Get a company

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
companyCompany

Receive through the portal, or only send

With receive true the company is published on the Peppol network as a receiver of invoices, credit notes and Invoice Responses, and what is sent to it arrives here. With false it only sends, and is not found as a receiver: for a company that receives through another access point, or not at all. A company being set up at the access point answers 409 NOT_PROVISIONED.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonReceivingRequest

Svar 200

application/json
companyCompany

Replace a company's settings

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Innehåll i förfrågan

application/jsonCompanySettings

Svar 200

application/json
companyCompany

Where the company is in being verified

A company is on the Peppol network once the access point has verified that it controls the legal entity its identifier names: a register extract and an agreement signed by those who may bind it. Until then its Peppol ID waits (status PENDING_APPROVAL), and needed is true. A company in test mode is never verified, and needs not be.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 200

application/json
verificationVerification

Get a link to verify the company

A link to the access point's page where the company's own people upload its register extract and choose who signs the agreement. It works for 30 days, any number of times, and is ended by the next. 409 NOTHING_TO_VERIFY for a company in test mode or verified already.

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 201

application/json
onboardingOnboarding

Get the caller and its companies

Svar 200

application/json
companieslista av Company
userobject

Get usage

How many documents the company sent and received per day, week or month, over the last thirty days unless from and to say otherwise. Only periods with any are listed; day is the day, the Monday the week begins on, or the month as YYYY-MM.

Parametrar

fromi fråganThe first day, as YYYY-MM-DD.
toi fråganThe last day, as YYYY-MM-DD.
byi fråganday, the default, week or month.

Svar 200

application/json
dayslista av object
fromstring
receivedinteger
sentinteger
tostring

Account

For those who run several companies, such as resellers: keys that reach every company of the account, and usage across them.

List the account's keys

Not for API keys.

Svar 200

application/json
apiKeyslista av ApiKey

Create an account key

An account key acts as the person: it reaches every company of theirs under /v1/companies/{companyId}, may add companies, and may not make keys. The key itself is in the answer, and nowhere after it. Not for API keys.

Innehåll i förfrågan

application/jsonApiKeyRequest

Svar 201

application/json
apiKeyApiKey

Revoke an account key

Parametrar

idi sökvägenThe id of what the path names: a document, a webhook, a watch, a company or an API key.

Svar 204

Inget innehåll.

What was done to the account

Changes to the account itself that are about no one company, such as its account keys, newest first. Each company's own are under its /audit.

Parametrar

limiti fråganHow many, at most 200; 50 when left out.
cursori fråganContinue after an earlier page, from its nextCursor.

Svar 200

application/json
entrieslista av AuditEntry
nextCursorstring

Get the month against the plan

How many documents the account has sent this month, how many its plan includes, and, beyond them, the price of each or, on a plan with a cap, what is left. Plans and payment are the account's in the SaaS kit. For a company's key, the account that added the company.

Svar 200

application/json
balanceBalance

Get usage for every company

How many documents each of the caller's companies sent and received, over the last thirty days unless from and to say otherwise.

Parametrar

fromi fråganThe first day, as YYYY-MM-DD.
toi fråganThe last day, as YYYY-MM-DD.

Svar 200

application/json
companieslista av object
fromstring
receivedinteger
sentinteger
tostring

Free tools

For anyone, without a key: checks and conversions that store nothing. Limited per address.

post/v1/tools/convertKräver ingen nyckel

Convert any e-invoice to another format

Reads a document in any of the formats and answers with it as Peppol BIS Billing 3.0 UBL, or as what to asks for: cii (EN 16931 profile), xrechnung (XRechnung 3.0 CII) or factur-x (PDF/A-3 with the CII inside). UBL asked for as UBL is answered as it is.

Parametrar

toi fråganubl (the default), cii, xrechnung or factur-x.
langi fråganThe language of the pages of a Factur-X: sv, en, de, fr, nl, da, nb, fi, it or es; English when left out.

Innehåll i förfrågan

application/xmlstringThe document; a PDF as application/pdf.

Svar 200

application/xmlstringThe document in the format asked for; a Factur-X as application/pdf.
get/v1/tools/iban/{iban}Kräver ingen nyckel

Check an IBAN

Whether the IBAN's length and check digits are right. Spaces are allowed.

Parametrar

ibani sökvägenAn IBAN, with or without spaces.

Svar 200

application/json
countrystring
ibanstring
validboolean

Check an identifier

Whether the value is a valid identifier under the scheme: a GLN under 0088, a Swedish organisation number under 0007, a Norwegian under 0192, and so on. Schemes without a known form are answered valid.

Parametrar

schemei sökvägenAn identifier scheme from the Peppol list, such as 0007 or 0088.
valuei sökvägenThe identifier under the scheme.

Svar 200

application/json
reasonstring
schemestring
validboolean
valuestring
get/v1/tools/import-template/{format}Kräver ingen nyckel

The spreadsheet template for invoices

The spreadsheet /imports reads, as csv or xlsx: one row a line, the invoice's own columns on its first row, with two example invoices. The workbook's second sheet says what each column is for. Column names in Swedish are read too.

Parametrar

formati sökvägencii, xrechnung or factur-x.

Svar 200

text/csvstringThe template.
post/v1/tools/pdfKräver ingen nyckel

Draw any e-invoice as PDF

Reads a document in any of the formats and draws it as pages to read.

Parametrar

langi frågansv, en, de, fr, nl, da, nb, fi, it or es; English when left out.

Innehåll i förfrågan

application/xmlstringThe document; a PDF as application/pdf.

Svar 200

application/pdfstringThe document as pages.
post/v1/tools/previewKräver ingen nyckel

Total up an invoice being filled in

Takes a document as JSON, as the portal's model has it, and answers with its totals and what is wrong with it as an e-invoice. For a form to show while it is filled in; nothing is stored.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 200

application/jsonToolPreview
post/v1/tools/readKräver ingen nyckel

Read any e-invoice for showing

Reads a document in any of the formats and answers with its content as the portal's document model, its totals and its attachments by name, as a document in the portal is answered. For drawing it; nothing is stored.

Innehåll i förfrågan

application/xmlstringThe document; a PDF as application/pdf.

Svar 200

application/jsonToolRead
post/v1/tools/validateKräver ingen nyckel

Validate any e-invoice

Reads an invoice or credit note as UBL, CII (XRechnung, ZUGFeRD, Factur-X), a Factur-X or ZUGFeRD PDF, or FatturaPA, and answers with what is wrong with it: its fields, and the Peppol rules where it has no field errors and is at most 512 kB.

Innehåll i förfrågan

application/xmlstringThe document; a PDF as application/pdf.

Svar 200

application/jsonToolValidation
get/v1/tools/vat/{number}Kräver ingen nyckel

Check an EU VAT number with VIES

Asks the European Commission's VIES whether the number is registered, and for whom where the country says.

Parametrar

numberi sökvägenAn EU VAT number, such as SE556123456701.

Svar 200

application/json
post/v1/tools/writeKräver ingen nyckel

Write an invoice without an account

Takes a document as JSON and answers with it as to says: ubl (Peppol BIS Billing 3.0, the default), cii, xrechnung or factur-x, which it must be valid to be (else 422 with the errors), or pdf, pages to read alone, which it may be whatever it says. Nothing is stored or sent.

Parametrar

toi fråganubl (the default), cii, xrechnung, factur-x or pdf.
langi fråganThe language of the pages of a PDF or Factur-X: sv, en, de, fr, nl, da, nb, fi, it or es; English when left out.

Innehåll i förfrågan

application/jsonDocumentContent

Svar 200

application/xmlstringThe document in the format asked for; a Factur-X or PDF as application/pdf.

Reference data

The code lists documents are validated against.

get/v1/codesKräver ingen nyckel

Get the code lists

The code lists and reference data a client needs to offer the choices a document has: the same data documents are validated against.

Svar 200

application/json
allowanceReasonslista av Code
chargeReasonslista av Code
countrieslista av Code
creditNoteTypeslista av Code
currencieslista av Code
endpointSchemeslista av Code
identifierSchemeslista av Code
internationalSchemeslista av Scheme
invoiceTypeslista av Code
itemIdTypeslista av Code
mimeTypeslista av Code
paymentMeanslista av Code
referenceTypeslista av Code
schemesByCountryobjekt med lista av Scheme per nyckel
taxPointCodeslista av Code
unitslista av Code
vatCategorieslista av Code
vatExemptionslista av Code
vatRatesobjekt med VATRates per nyckel

Schemas

Det som skickas och tas emot. En stjärna märker fält som alltid finns med i ett svar och som måste anges i en förfrågan.

AccessPointFinding

AccessPointFinding is one finding of the access point's Peppol validation.

severity*string
rulestring
locationstring
message*string

Account

id*stringid is the IBAN, or the account number where there is no IBAN (BT-84).
namestringEN 16931 BT-85
bicstringEN 16931 BT-86

Address

streetstring
street2string
street3string
citystring
postal_codestring
subdivisionstring
country*string

Adjustment

Adjustment is an allowance or a charge. Its amount is given outright, or as Percent of BaseAmount.

reasonstring
reason_codestringreason_code is a UNCL5189 code for an allowance, UNCL7161 for a charge.
amountnumberA decimal number, with the decimals it has.
percentnumberA decimal number, with the decimals it has.
base_amountnumberA decimal number, with the decimals it has.

AllowanceCharge

AllowanceCharge is a document-level allowance or charge, which carries the VAT it is subject to.

reasonstring
reason_codestringreason_code is a UNCL5189 code for an allowance, UNCL7161 for a charge.
amountnumberA decimal number, with the decimals it has.
percentnumberA decimal number, with the decimals it has.
base_amountnumberA decimal number, with the decimals it has.
vat*VAT

ApiKey

id*string
name*string
prefix*stringprefix is the start of the key, enough to tell it from the others.
createdAt*string
keystringkey is the key itself, present only in the answer that creates it.

ApiKeyRequest

Types the handlers read that are worth a name.

name*stringname tells the key from the company's other keys.

Attachment

Attachment is a supporting document: embedded as Content, referred to by URL, or only named, by ID and Description. Some countries use the last form for a number the tax authority has issued for the invoice.

idstring
descriptionstring
filenamestring
mimestring
contentstringcontent is the file, base64-encoded.
urlstring

Attribute

name*string
value*string

AuditEntry

AuditEntry is something someone did.

id*string
at*string
action*stringaction names what was done, such as document.send, api_key.create or company.settings.
targetstringtarget is the id of what it was done to: a document, a key, a webhook.
companyIdstringcompanyId is the company it was about; none for the account's own.
actor*objectactor is who did it: kind person (id is the person's user id), key (the API key's id) or dev.
request*objectrequest is the call as made.
addressstringaddress is where the request came from.

Balance

Balance is how far the account is into its month, against its plan in the SaaS kit. Only sent documents count; received ones, and those of a company in test mode, cost nothing.

planstringplan names the account's plan, as the person's sign-in says; empty for a key, which may ask the kit through the portal for the figures alone.
counted*booleancounted says the kit keeps the count; false where the portal runs without it, when nothing below is known.
sent*integersent is how many documents were sent this month (UTC), and included how many the plan includes.
included*integer
overageintegeroverage is the price of each document beyond included, in minor units of currency, billed afterwards. Zero: included is a cap, and remaining is what is left of it.
currencystring
remaininginteger
periodStartstringperiodStart and periodEnd are the month the counts are for.
periodEndstring
enforced*booleanenforced says whether a used-up cap stops sending.

BillingReference

number*string
issue_datestring

Card

Card is the card an invoice was paid with. Number is only its last four to six digits.

number*string
network*string
holderstring

Classification

Classification places an item in a classification scheme, such as CPV.

code*string
list_id*stringlist_id is the scheme's UNCL7143 code.
list_versionstring

Code

id*string
name*string

Company

id*string
name*string
countryCode*string
registrationNumber*string
peppolId*string
sandbox*booleansandbox companies are for trying things out: off the Peppol network.
sendOnly*booleansendOnly says the company only sends through the portal: it is not published on the network as a receiver.
status*stringstatus is PROVISIONING until the access point knows the company, then the participant's status there, or FAILED with statusDetail.
statusDetailstring
settings*CompanySettings
inboundAddressstringinboundAddress is where documents are emailed to for the company: an attachment in any format the portal reads becomes a draft. Only mail from the senders in settings.mailSenders is taken in.
createdAt*string

CompanyRequest

Types the handlers read that are worth a name.

name*string
countryCode*string
schemestringscheme and identifier are the company's Peppol ID. scheme may be left out where the country has one usual scheme.
identifier*string
registrationNumberstringregistrationNumber is an older name for identifier.
sandboxbooleansandbox makes a company for trying things out, off the network.
sendOnlybooleansendOnly makes a company that sends through the portal but is not published on the network as a receiver: it receives elsewhere, or not at all. Receiving can be turned on later.

CompanySettings

CompanySettings are what a company's users choose themselves.

forwardEmails*lista av stringforwardEmails are where received documents are forwarded to.
mailSenders*lista av stringmailSenders are the addresses that may email documents in for the company; mail from anyone else is dropped. mailSend has a document that arrived by mail and has no errors sent at once.
mailSend*boolean
embedPdf*booleanembedPdf puts the document drawn as a PDF inside what is sent, as an attachment, for receivers whose systems show one.
language*stringlanguage is what the company is written to in, and its documents drawn in: one of the portal's languages (sv, en, de, fr, nl, da, nb, fi, it, es); empty means the language of the company's country.
street*stringThe rest is what the company puts on the invoices it sends.
postalCode*string
city*string
vatNumber*string
fTax*booleanFTax: the company is approved for F-tax, which a Swedish invoice states.
iban*string
bic*string

Counterparty

name*string
peppolId*string

Delivery

namestringEN 16931 BT-70, who it is delivered to
location_idIdentifierEN 16931 BT-71
datestringEN 16931 BT-72
addressAddressEN 16931 BG-15

Difference

term*string
name*string
stated*string
computed*string

DirectDebit

mandate_id*stringEN 16931 BT-89
creditor_idstringEN 16931 BT-90
accountstringEN 16931 BT-91, the account debited

Document

Document is a single document in full.

id*string
direction*stringEtt av: inbound, outbound
type*stringEtt av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE
state*stringEtt av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received
sourcestringsource is "ubl" for a document uploaded as finished UBL.
number*string
issueDate*string
dueDatestring
currency*string
payableAmount*string
counterparty*Counterparty
errorstringerror says why a failed or unconfirmed document is in that state.
warningslista av Warningwarnings are what looked wrong about a received document when it arrived, for a person to judge before paying: a sender that is not the seller, a new account, a repeated number. A draft read from another format has totals_recomputed when its totals, computed, came to otherwise than the file stated.
responseDocumentResponseresponse is the latest Invoice response about the document: sent by the company about a received one, or received about a sent one.
createdAt*string
updatedAt*string
document*DocumentContentdocument is the content as the client wrote it.
validation*lista av FieldErrorvalidation lists what must be fixed before the draft can be sent.
validationErrorslista av AccessPointFindingvalidationErrors are the access point's findings on a document in state invalid.
totals*Totals
timeline*lista av TimelineEvent
findingslista av Findingfindings are what the Peppol rules say about the document, present when they have been asked: after validate, or a send they refused.
attachments*lista av DocumentAttachmentattachments are the files of the document, each fetched by its index from .../attachments/{index} when it is embedded.

DocumentAttachment

index*integer
idstring
descriptionstring
filenamestring
mimestring
urlstringurl is where the file is, when it is linked to and not embedded.
embedded*boolean
sizeintegersize is the embedded file's size in bytes.

DocumentContent

DocumentContent is an invoice or a credit note as clients write it. Totals are not part of it: they are computed, see Totals.

document_type*stringEtt av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE
type_codestringtype_code is the UNCL1001 code (BT-3), for the rarer kinds that have no document type of their own; empty means the type's default.
number*stringEN 16931 BT-1
issue_date*stringEN 16931 BT-2
due_datestring
tax_point_datestringtax_point_date (BT-7) is when VAT becomes chargeable if that is not the issue date. tax_point_code (BT-8, UNCL2005) names the date by its kind instead; a document has one or the other.
tax_point_codestring
currency*stringEN 16931 BT-5
tax_currencystringtax_currency (BT-6) is the currency VAT is accounted in when that is not the invoice currency; tax_amount_in_tax_currency (BT-111) is then the total VAT in it, which only the issuer knows the exchange rate for.
tax_amount_in_tax_currencynumberA decimal number, with the decimals it has.
buyer_referencestringOne of buyer_reference and order_reference is required by Peppol.
order_referencestringEN 16931 BT-13
sales_order_referencestringEN 16931 BT-14
contract_referencestringEN 16931 BT-12
project_referencestringEN 16931 BT-11
receipt_referencestringEN 16931 BT-15, the receiving advice
despatch_referencestringEN 16931 BT-16
tender_referencestringEN 16931 BT-17
object_referenceIdentifierEN 16931 BT-18, what the invoice is about
accounting_referencestringaccounting_reference (BT-19) is where the buyer books the invoice.
billing_referenceslista av BillingReferencebilling_references (BG-3) name the invoices a credit note credits, or an invoice corrects.
notestringEN 16931 BT-22
periodPeriodEN 16931 BG-14
seller*Party
buyer*Party
payeePayeeEN 16931 BG-10, when not the seller
tax_representativeTaxRepresentativeEN 16931 BG-11
deliveryDeliveryEN 16931 BG-13
paymentPayment
lines*lista av Line
allowanceslista av AllowanceChargeEN 16931 BG-20
chargeslista av AllowanceChargeEN 16931 BG-21
prepaid_amountnumberprepaid_amount (BT-113) has been paid already; rounding_amount (BT-114) rounds what remains to an amount that can be paid.
rounding_amountnumberA decimal number, with the decimals it has.
attachmentslista av AttachmentEN 16931 BG-24

DocumentInShort

type*string
number*string
issueDate*string
dueDatestring
currency*string
seller*string
buyer*string
lines*integer
payableAmount*string

DocumentResponse

DocumentResponse is what one party said of a document to the other.

code*stringcode is the status: AB, IP, UQ, CA, RE, AP or PD.
reasonCodestring
reasonstring
at*string (date-time)
sent*booleansent says the company sent it; otherwise it was received.

DocumentSummary

DocumentSummary is a document as lists show it.

id*string
direction*stringEtt av: inbound, outbound
type*stringEtt av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE
state*stringEtt av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received
sourcestringsource is "ubl" for a document uploaded as finished UBL.
number*string
issueDate*string
dueDatestring
currency*string
payableAmount*string
counterparty*Counterparty
errorstringerror says why a failed or unconfirmed document is in that state.
warningslista av Warningwarnings are what looked wrong about a received document when it arrived, for a person to judge before paying: a sender that is not the seller, a new account, a repeated number. A draft read from another format has totals_recomputed when its totals, computed, came to otherwise than the file stated.
responseDocumentResponseresponse is the latest Invoice response about the document: sent by the company about a received one, or received about a sent one.
createdAt*string
updatedAt*string

Export

Export is the company's archive written out as zip files.

id*string
state*stringstate is pending, running (parts are being written), ready or failed.
directionstringdirection, from and to are what the export was narrowed to.
fromstring
tostring
pdf*booleanpdf says the documents are drawn as pages too.
documents*integerdocuments is how many are written so far.
parts*lista av ExportPartparts are the zip files, fetched from /exports/{id}/parts/{number} once the export is ready. A large archive comes in several.
errorstring
createdAt*string
completedAtstring

ExportInput

ExportInput says which documents an export is of. Every document but drafts, which are not in the archive yet, unless narrowed.

directionstringdirection is inbound or outbound; empty is both.
fromstringfrom and to bound the issue date, inclusive, as YYYY-MM-DD.
tostring
pdfbooleanpdf draws each document as pages too, in the company's language.

ExportPart

ExportPart is one zip file of an export: in it, a folder per document with its XML as sent or received, any earlier failed sends, its pages as PDF and its files, and index.csv and index.json listing them.

number*integer
documents*integer
size*integer

FieldError

FieldError is a problem with one field of a document. Path is the field's place in the JSON, such as "lines[0].vat.rate"; Rule is the EN 16931 or Peppol rule the problem would break, where there is one.

path*string
message*string
rulestring

FileUpload

filename*string
mime*string
description*string
size*integer

Finding

Finding is one result of validating a document against the Peppol rules.

severity*stringseverity is "fatal" for what makes the document invalid, "warning" for what does not.
rule*string
location*string
message*string
layer*stringlayer is "schema" when the document does not even follow the XML schema, in which case the business rules have not been run.

ForwardRequest

ForwardRequest asks for a received document to be mailed on.

emails*lista av stringemails are where to mail it; the company's forwarding addresses when left out.

Identifier

Identifier is a value in a named scheme, such as a GLN (scheme 0088).

schemestring
value*string

Import

Import is a file drafts are made from.

id*string
state*stringstate is pending while the drafts are made, then done or failed.
filenamestring
kind*stringkind is spreadsheet, pages (a PDF or image read by a model) or document (an e-invoice).
documents*lista av stringdocuments are the ids of the drafts made, one an invoice.
problems*lista av ImportProblemproblems are what could not be read, by row for a spreadsheet; the invoices of the other rows are made all the same.
errorstringerror says why nothing could be made, when the import failed.
createdAt*string
updatedAt*string

ImportProblem

ImportProblem is something an import could not read.

rowintegerrow is the spreadsheet's row, the header being row 1.
columnstring
message*string

ImportUploadRequest

ImportUploadRequest asks where to put a file too large to send to the API itself.

contentType*string
size*integersize is the file's, in bytes.

Line

idstringEN 16931 BT-126
notestringEN 16931 BT-127
name*stringname is what is sold (BT-153); description says more about it (BT-154).
descriptionstring
quantity*numberEN 16931 BT-129
unitstringunit is a UN/ECE Recommendation 20 code; C62 ("one") when empty.
unit_price*numberunit_price is the net price (BT-146): after any discount, before VAT, for price_base_quantity units (BT-149), which is 1 when not given.
price_base_quantitynumberA decimal number, with the decimals it has.
gross_pricenumbergross_price (BT-148) is the price before discount, shown for information; the discount (BT-147) is its difference from unit_price.
allowanceslista av AdjustmentEN 16931 BG-27
chargeslista av AdjustmentEN 16931 BG-28
vat*VAT
periodPeriodEN 16931 BG-26
order_line_referencestringEN 16931 BT-132
accounting_referencestringEN 16931 BT-133
object_referenceIdentifierEN 16931 BT-128
item_codestringEN 16931 BT-155, the seller's
buyer_item_codestringEN 16931 BT-156
standard_item_idIdentifierEN 16931 BT-157, such as a GTIN
classificationslista av ClassificationEN 16931 BT-158
origin_countrystringEN 16931 BT-159
attributeslista av AttributeEN 16931 BG-32

Onboarding

Onboarding is a link to where the company's own people verify it.

url*string
expiresAt*string

Participant

Participant is a company on the Peppol network.

peppolId*stringpeppolId is scheme:value, such as 0007:5561234567.
registered*booleanregistered is whether anything is registered under the ID. A search for an ID that nobody has answers with it, not registered.
namestring
countryCodestring
invoice*booleanWhat the company has said it receives.
creditNote*boolean
selfBillingInvoice*boolean
selfBillingCreditNote*boolean
documentTypes*lista av stringdocumentTypes are the identifiers of everything it receives.

Party

name*stringname is the legal name (BT-27, BT-44); trading_name is the name the party is known by, when that differs (BT-28, BT-45).
trading_namestring
identifierslista av Identifieridentifiers (BT-29, BT-46) are other ways the party is identified. A buyer has at most one.
registration_idstringregistration_id is the legal registration number (BT-30, BT-47), such as an organisation number, in registration_scheme if that is given.
registration_schemestring
tax_idstringtax_id is the VAT number with its country prefix (BT-31, BT-48).
tax_registrationstringtax_registration (BT-32, seller only) is a local tax registration, or a reference to one: in Sweden "GODKÄND FÖR F-SKATT".
legal_infostringlegal_info (BT-33, seller only) is what law requires stated, such as share capital or registered office.
peppol_id*stringpeppol_id is the party's electronic address, as scheme:value.
address*Address
contactstring
phonestring
emailstring

Payee

Payee receives the payment when that is not the seller.

name*string
identifierIdentifier
registration_idstring
registration_schemestring

Payment

Payment says how the invoice is to be paid.

means_codestringmeans_code is a UNCL4461 code (BT-81); 30, credit transfer, when empty. means_text (BT-82) says it in words.
means_textstring
referencestringreference (BT-83) is what the payer quotes so the payment is matched.
termsstringEN 16931 BT-20
accountslista av Accountaccounts (BG-17) are where a credit transfer goes.
cardCardEN 16931 BG-18
direct_debitDirectDebitEN 16931 BG-19

Period

start_datestring
end_datestring

Problem

Problem is an RFC 9457 problem document. Code is the stable value for clients to branch on; Field names the input a validation failure is about.

type*string
title*string
status*integer
code*string
detail*string
fieldstring

ReceivingRequest

Types the handlers read that are worth a name.

receive*booleanreceive publishes the company on the network as a receiver of invoices, credit notes and Invoice Responses; false has it only send.

ResponseInput

ResponseInput is what the company says of a received document.

code*stringcode is the status: AB, IP, UQ, CA, RE, AP or PD.
reasonCode*stringreasonCode and reason say why; a query, a condition or a rejection must give a reason code.
reason*string
effectiveDate*stringeffectiveDate is when the status took effect, such as the day paid.

Scheme

Scheme is an identifier scheme a company in a country is known by.

id*stringid is the scheme's code in the endpoint scheme list, such as "0007".
label*stringlabel names the identifier as its holders know it.
vatbooleanvat marks a scheme whose identifier is the VAT number, written with its country prefix.

TaxRepresentative

TaxRepresentative accounts for the seller's VAT where the seller cannot.

name*string
tax_id*string
address*Address

TimelineEvent

at*string
event*string
detailstring

ToolPreview

ToolPreview is what a document someone is filling in comes to: its totals, and what is wrong with it as an e-invoice.

totals*Totals
validation*lista av FieldError

ToolRead

ToolRead is a document read for showing: its content as the portal's model, the totals as the document states them, and its attachments by name.

format*stringformat is what the document was written in: ubl, cii, factur-x or fatturapa.
document*DocumentContentdocument is the content; the attachments' content is left out.
totals*Totals
attachments*lista av DocumentAttachment

ToolValidation

ToolValidation is what the free validator says of a document.

format*stringformat is what the document was written in: ubl, cii, factur-x or fatturapa.
unreadablestringunreadable says why the document could not be read at all.
valid*boolean
rulesChecked*booleanrulesChecked says whether the Peppol rules were asked; a document with field errors, or larger than 512 kB, is not.
validation*lista av FieldError
findings*lista av Finding
summaryDocumentInShortsummary is the document in short, for showing.
recomputedlista av Differencerecomputed are the totals of a document in another format that come to otherwise, computed the way EN 16931 prescribes, than it states: written as Peppol BIS, the computed ones are.

Totals

lineExtensionAmount*string
allowanceTotalAmount*string
chargeTotalAmount*string
taxExclusiveAmount*string
taxAmount*string
taxInclusiveAmount*string
prepaidAmount*string
roundingAmount*string
payableAmount*string
lineAmounts*lista av stringlineAmounts is each line's net amount, in line order.
vat*lista av VatSubtotal

Validation

valid*booleanvalid says the document has no field errors and breaks no rule that was checked.
rulesChecked*booleanrulesChecked says whether the Peppol rules were asked. They are not for a document with field errors, which come first.
validation*lista av FieldErrorvalidation lists the field errors of a document given as JSON.
findings*lista av Findingfindings are what the Peppol rules say.
unreadablestringunreadable says why a document given as UBL could not be read.
totalsTotals
ublstringubl is the document as UBL, when it was given as JSON and has no field errors.

VAT

category*stringcategory is a UNCL5305 code: S, Z, E, AE, K, G, O, L, M or B.
rate*numberA decimal number, with the decimals it has.
exemption_reason_codestringexemption_reason_code (BT-121, a VATEX code) and exemption_reason (BT-120) say why no VAT is charged. One of them is required for categories E, AE, K, G and O, and neither is allowed for the others.
exemption_reasonstring

VatCheck

VatCheck is what VIES says of a number.

countryCode*string
vatNumber*string
valid*boolean
namestringname and address are the holder's, where the member state gives them.
addressstring
checkedAt*stringcheckedAt is when VIES answered.

VATRates

VATRates are the VAT rates in use in a country. They are offered as suggestions and never enforced: rates change, regions and special regimes have their own, and the invoice is its issuer's to get right.

standard*lista av stringstandard is the standard rate, followed by any regional standard rate.
other*lista av stringother is every reduced, super-reduced, parking and zero rate, highest first.

VatSubtotal

category*string
rate*string
exemptionReasonCodestring
exemptionReasonstring
taxableAmount*string
taxAmount*string

Verification

Verification is where a company is in being verified by the access point: a company that has not been waits before it is on Peppol.

needed*booleanneeded says the company waits to be verified. A company in test mode needs not be.
statusstringstatus is NOT_STARTED, PENDING_SIGNATURES (the agreement is out to be signed), MANUAL_REVIEW, VERIFIED, REJECTED, EXPIRED or WITHDRAWN; empty where there is nothing to verify.

Warning

Warning is one thing that looked wrong about a received document.

code*stringcode is for programs: sender_mismatch, new_supplier, new_account, duplicate_number, due_date_passed, or totals_recomputed on a draft.
message*string

Watch

Watch is a party the company waits for on the Peppol network.

id*string
peppolId*stringpeppolId is the id watched, as scheme:value.
namestringname is what the company calls the party.
emailstringemail is where the company is told when the party appears.
createdAt*string
checkedAtstringcheckedAt is when the network was last asked.
found*booleanfound says the party is registered now: since foundAt, as registeredName, receiving receives (invoice, credit-note, ...).
foundAtstring
registeredNamestring
receives*lista av string

WatchRequest

WatchRequest puts a watch on a party.

peppolId*stringpeppolId is the id to wait for, as scheme:value.
namestringname is what the company calls the party, for its own reading.
emailstringemail is where to be told when the party appears; nobody is mailed when left out, and the webhooks are told either way.

Webhook

id*string
url*string
events*lista av stringevents are the event types delivered; empty means all of them.
enabled*boolean
secret*stringsecret signs every delivery: the X-Portal-Signature header holds t=<unix time>,v1=<HMAC-SHA256 of "<unix time>.<body>" in hex>.
createdAt*string

WebhookDelivery

eventId*string
event*string
documentIdstring
attempt*integer
at*string
delivered*boolean
statusintegerstatus is the HTTP status the receiver answered with, if it answered.
errorstring

WebhookDocument

WebhookDocument is the data of a document event: enough to know what happened to which document, and its id to fetch the rest.

id*string
direction*string
type*string
state*stringEtt av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received
number*string
issue_date*string
currency*string
payable_amount*string
counterparty*object
errorstring
warningslista av Warningwarnings are what looked wrong about a received document.
responseDocumentResponseresponse is the latest Invoice response about the document.

WebhookEvent

WebhookEvent is what a webhook is sent.

id*string
type*stringEtt av: document.received, document.sent, document.failed, document.unconfirmed, document.response, participant.registered, webhook.test
created_at*string
company_id*string
data*WebhookDocument eller WebhookRegistered eller null

WebhookRegistered

WebhookRegistered is the data of a participant.registered event: the watch that was waiting, and what was found.

watch_id*string
peppol_id*string
namestringname is what the company called the party; registered_name what it is registered as.
registered_namestring
receives*lista av string

WebhookRequest

Types the handlers read that are worth a name.

url*stringurl is where events are delivered: an https address on the public internet.
eventslista av stringevents are the event types to deliver; all of them when empty.
enabledbooleanenabled is true unless given as false.