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
| direction | i frågan | Only documents inbound (received) or outbound (the company's own). |
| state | i frågan | Only documents in this state. Several are given with commas between them, or by repeating the parameter. |
| type | i frågan | Only documents of this type, such as INVOICE or CREDIT_NOTE. |
| from | i frågan | Only documents issued on this date or later, as YYYY-MM-DD. |
| to | i frågan | Only documents issued on this date or earlier, as YYYY-MM-DD. |
| q | i frågan | Only documents with this in their number, or in the other party's name or Peppol ID. Case is ignored. |
| order | i frågan | desc, the default, lists the newest first; asc the oldest. |
| limit | i frågan | How many documents to answer with, at most 100. 50 when left out. |
| cursor | i frågan | The nextCursor of the page before, to continue after it. |
Svar 200
| documents | lista av DocumentSummary | |
| nextCursor | string |
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
Svar 201
| document | Document |
Get a document
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| document | Document |
Replace a draft
Replaces what a draft says. Its files stay as they are.
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| document | Document |
Delete a draft
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 204
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| filename | i frågan | The file's name. |
| description | i frågan | What the file is, for the receiver to read. |
Innehåll i förfrågan
Svar 201
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| n | i sökvägen | The attachment's index in the document's attachments. |
Svar 200
Remove an attachment from a draft
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| n | i sökvägen | The attachment's index in the document's attachments. |
Svar 200
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 201
| expiresAt | string (date-time) | |
| fileId | string | |
| headers | objekt med string per nyckel | |
| uploadUrl | string |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| fileId | i sökvägen | The fileId the upload was started with. |
Innehåll i förfrågan
Svar 201
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 201
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| format | i sökvägen | cii, xrechnung or factur-x. |
| lang | i frågan | The 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
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| lang | i frågan | sv, 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
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 202
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 202
| document | Document |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
Validate a stored document
Asks the Peppol rules about a stored document, without sending it. What they say is in findings.
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| document | Document |
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
Svar 200
| document | Document |
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
Svar 201
| document | Document |
List exports
The company's exports of the last seven days, newest first.
Svar 200
| exports | lista 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
Svar 202
| export | Export |
Get an export
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| export | Export |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
| n | i sökvägen | The attachment's index in the document's attachments. |
Svar 200
List imports
Svar 200
| imports | lista 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
| filename | i frågan | The file's name, which tells a CSV file by its extension. |
| upload | i frågan | The uploadId of a file put to a link from /imports/uploads, in place of a body. |
| contentType | i frågan | With upload: the file's content type. |
Innehåll i förfrågan
Svar 202
| import | Import |
Get an import
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| import | Import |
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
Svar 201
| expiresAt | string | |
| headers | objekt med string per nyckel | |
| uploadId | string | |
| uploadUrl | string |
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
Svar 201
| document | Document |
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
Svar 200
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
Svar 200
Peppol directory
Who is on the Peppol network, and what they receive.
Search the Peppol directory
Parametrar
| q | i frågan | A Peppol ID (0007:5561234567), a national number, or part of a name. |
Svar 200
| participants | lista av Participant |
Look up a Peppol ID
Whether anything is registered under the ID, and what it receives.
Parametrar
| peppolId | i sökvägen | A Peppol ID, as scheme:value, such as 0007:5561234567. |
Svar 200
| participant | Participant |
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
| number | i sökvägen | An EU VAT number, such as SE556123456701. |
Svar 200
| participant | Participant | |
| tried | lista av string |
List the parties waited for
The parties the company waits for on the Peppol network, found or not.
Svar 200
| watches | lista 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
Svar 201
| watch | Watch |
Get a watch
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| watch | Watch |
Stop waiting for a party
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 204
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| watch | Watch |
Webhooks
Where the company is told of what happens to its documents.
List webhooks
Svar 200
| events | lista av string | |
| webhooks | lista av Webhook |
Create a webhook
Innehåll i förfrågan
Svar 201
| webhook | Webhook |
Get a webhook
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| webhook | Webhook |
Replace a webhook
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| webhook | Webhook |
Delete a webhook
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 204
List a webhook's latest deliveries
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| deliveries | lista av WebhookDelivery |
Deliver a test event
Delivers a webhook.test event now and answers with how it went.
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| delivery | WebhookDelivery |
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
| limit | i frågan | How many, at most 200; 50 when left out. |
| cursor | i frågan | Continue after an earlier page, from its nextCursor. |
Svar 200
| entries | lista av AuditEntry | |
| nextCursor | string |
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
Svar 201
| company | Company |
List API keys
Not for API keys.
Parametrar
| companyId | i sökvägen | The company's id. |
Svar 200
| apiKeys | lista av ApiKey |
Create an API key
The key itself is in the answer, and nowhere after it. Not for API keys.
Parametrar
| companyId | i sökvägen | The company's id. |
Innehåll i förfrågan
Svar 201
| apiKey | ApiKey |
Revoke an API key
Parametrar
| companyId | i sökvägen | The company's id. |
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 204
Get a company
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| company | Company |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| company | Company |
Replace a company's settings
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Innehåll i förfrågan
Svar 200
| company | Company |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 200
| verification | Verification |
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
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 201
| onboarding | Onboarding |
Get the caller and its companies
Svar 200
| companies | lista av Company | |
| user | object |
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
| from | i frågan | The first day, as YYYY-MM-DD. |
| to | i frågan | The last day, as YYYY-MM-DD. |
| by | i frågan | day, the default, week or month. |
Svar 200
| days | lista av object | |
| from | string | |
| received | integer | |
| sent | integer | |
| to | string |
Account
For those who run several companies, such as resellers: keys that reach every company of the account, and usage across them.
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
Svar 201
| apiKey | ApiKey |
Revoke an account key
Parametrar
| id | i sökvägen | The id of what the path names: a document, a webhook, a watch, a company or an API key. |
Svar 204
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
| limit | i frågan | How many, at most 200; 50 when left out. |
| cursor | i frågan | Continue after an earlier page, from its nextCursor. |
Svar 200
| entries | lista av AuditEntry | |
| nextCursor | string |
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
| balance | Balance |
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
| from | i frågan | The first day, as YYYY-MM-DD. |
| to | i frågan | The last day, as YYYY-MM-DD. |
Svar 200
| companies | lista av object | |
| from | string | |
| received | integer | |
| sent | integer | |
| to | string |
Free tools
For anyone, without a key: checks and conversions that store nothing. Limited per address.
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
| to | i frågan | ubl (the default), cii, xrechnung or factur-x. |
| lang | i frågan | The 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
Svar 200
Check an IBAN
Whether the IBAN's length and check digits are right. Spaces are allowed.
Parametrar
| iban | i sökvägen | An IBAN, with or without spaces. |
Svar 200
| country | string | |
| iban | string | |
| valid | boolean |
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
| scheme | i sökvägen | An identifier scheme from the Peppol list, such as 0007 or 0088. |
| value | i sökvägen | The identifier under the scheme. |
Svar 200
| reason | string | |
| scheme | string | |
| valid | boolean | |
| value | string |
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
| format | i sökvägen | cii, xrechnung or factur-x. |
Svar 200
Draw any e-invoice as PDF
Reads a document in any of the formats and draws it as pages to read.
Parametrar
| lang | i frågan | sv, en, de, fr, nl, da, nb, fi, it or es; English when left out. |
Innehåll i förfrågan
Svar 200
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
Svar 200
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
Svar 200
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
Svar 200
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
| number | i sökvägen | An EU VAT number, such as SE556123456701. |
Svar 200
| vat | VatCheck |
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
| to | i frågan | ubl (the default), cii, xrechnung, factur-x or pdf. |
| lang | i frågan | The 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
Svar 200
Reference data
The code lists documents are validated against.
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
| allowanceReasons | lista av Code | |
| chargeReasons | lista av Code | |
| countries | lista av Code | |
| creditNoteTypes | lista av Code | |
| currencies | lista av Code | |
| endpointSchemes | lista av Code | |
| identifierSchemes | lista av Code | |
| internationalSchemes | lista av Scheme | |
| invoiceTypes | lista av Code | |
| itemIdTypes | lista av Code | |
| mimeTypes | lista av Code | |
| paymentMeans | lista av Code | |
| referenceTypes | lista av Code | |
| schemesByCountry | objekt med lista av Scheme per nyckel | |
| taxPointCodes | lista av Code | |
| units | lista av Code | |
| vatCategories | lista av Code | |
| vatExemptions | lista av Code | |
| vatRates | objekt 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 | |
| rule | string | |
| location | string | |
| message* | string |
Account
| id* | string | id is the IBAN, or the account number where there is no IBAN (BT-84). |
| name | string | EN 16931 BT-85 |
| bic | string | EN 16931 BT-86 |
Address
| street | string | |
| street2 | string | |
| street3 | string | |
| city | string | |
| postal_code | string | |
| subdivision | string | |
| country* | string |
Adjustment
Adjustment is an allowance or a charge. Its amount is given outright, or as Percent of BaseAmount.
| reason | string | |
| reason_code | string | reason_code is a UNCL5189 code for an allowance, UNCL7161 for a charge. |
| amount | number | A decimal number, with the decimals it has. |
| percent | number | A decimal number, with the decimals it has. |
| base_amount | number | A decimal number, with the decimals it has. |
AllowanceCharge
AllowanceCharge is a document-level allowance or charge, which carries the VAT it is subject to.
| reason | string | |
| reason_code | string | reason_code is a UNCL5189 code for an allowance, UNCL7161 for a charge. |
| amount | number | A decimal number, with the decimals it has. |
| percent | number | A decimal number, with the decimals it has. |
| base_amount | number | A decimal number, with the decimals it has. |
| vat* | VAT |
ApiKey
| id* | string | |
| name* | string | |
| prefix* | string | prefix is the start of the key, enough to tell it from the others. |
| createdAt* | string | |
| key | string | key is the key itself, present only in the answer that creates it. |
ApiKeyRequest
Types the handlers read that are worth a name.
| name* | string | name 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.
| id | string | |
| description | string | |
| filename | string | |
| mime | string | |
| content | string | content is the file, base64-encoded. |
| url | string |
Attribute
| name* | string | |
| value* | string |
AuditEntry
AuditEntry is something someone did.
| id* | string | |
| at* | string | |
| action* | string | action names what was done, such as document.send, api_key.create or company.settings. |
| target | string | target is the id of what it was done to: a document, a key, a webhook. |
| companyId | string | companyId is the company it was about; none for the account's own. |
| actor* | object | actor is who did it: kind person (id is the person's user id), key (the API key's id) or dev. |
| request* | object | request is the call as made. |
| address | string | address 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.
| plan | string | plan 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* | boolean | counted says the kit keeps the count; false where the portal runs without it, when nothing below is known. |
| sent* | integer | sent is how many documents were sent this month (UTC), and included how many the plan includes. |
| included* | integer | |
| overage | integer | overage 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. |
| currency | string | |
| remaining | integer | |
| periodStart | string | periodStart and periodEnd are the month the counts are for. |
| periodEnd | string | |
| enforced* | boolean | enforced says whether a used-up cap stops sending. |
BillingReference
| number* | string | |
| issue_date | string |
Card
Card is the card an invoice was paid with. Number is only its last four to six digits.
| number* | string | |
| network* | string | |
| holder | string |
Classification
Classification places an item in a classification scheme, such as CPV.
| code* | string | |
| list_id* | string | list_id is the scheme's UNCL7143 code. |
| list_version | string |
Code
| id* | string | |
| name* | string |
Company
| id* | string | |
| name* | string | |
| countryCode* | string | |
| registrationNumber* | string | |
| peppolId* | string | |
| sandbox* | boolean | sandbox companies are for trying things out: off the Peppol network. |
| sendOnly* | boolean | sendOnly says the company only sends through the portal: it is not published on the network as a receiver. |
| status* | string | status is PROVISIONING until the access point knows the company, then the participant's status there, or FAILED with statusDetail. |
| statusDetail | string | |
| settings* | CompanySettings | |
| inboundAddress | string | inboundAddress 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 | |
| scheme | string | scheme and identifier are the company's Peppol ID. scheme may be left out where the country has one usual scheme. |
| identifier* | string | |
| registrationNumber | string | registrationNumber is an older name for identifier. |
| sandbox | boolean | sandbox makes a company for trying things out, off the network. |
| sendOnly | boolean | sendOnly 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 string | forwardEmails are where received documents are forwarded to. |
| mailSenders* | lista av string | mailSenders 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* | boolean | embedPdf puts the document drawn as a PDF inside what is sent, as an attachment, for receivers whose systems show one. |
| language* | string | language 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* | string | The rest is what the company puts on the invoices it sends. |
| postalCode* | string | |
| city* | string | |
| vatNumber* | string | |
| fTax* | boolean | FTax: the company is approved for F-tax, which a Swedish invoice states. |
| iban* | string | |
| bic* | string |
Counterparty
| name* | string | |
| peppolId* | string |
Delivery
| name | string | EN 16931 BT-70, who it is delivered to |
| location_id | Identifier | EN 16931 BT-71 |
| date | string | EN 16931 BT-72 |
| address | Address | EN 16931 BG-15 |
Difference
| term* | string | |
| name* | string | |
| stated* | string | |
| computed* | string |
DirectDebit
| mandate_id* | string | EN 16931 BT-89 |
| creditor_id | string | EN 16931 BT-90 |
| account | string | EN 16931 BT-91, the account debited |
Document
Document is a single document in full.
| id* | string | |
| direction* | string | Ett av: inbound, outbound |
| type* | string | Ett av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE |
| state* | string | Ett av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received |
| source | string | source is "ubl" for a document uploaded as finished UBL. |
| number* | string | |
| issueDate* | string | |
| dueDate | string | |
| currency* | string | |
| payableAmount* | string | |
| counterparty* | Counterparty | |
| error | string | error says why a failed or unconfirmed document is in that state. |
| warnings | lista av Warning | warnings 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. |
| response | DocumentResponse | response 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* | DocumentContent | document is the content as the client wrote it. |
| validation* | lista av FieldError | validation lists what must be fixed before the draft can be sent. |
| validationErrors | lista av AccessPointFinding | validationErrors are the access point's findings on a document in state invalid. |
| totals* | Totals | |
| timeline* | lista av TimelineEvent | |
| findings | lista av Finding | findings 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 DocumentAttachment | attachments are the files of the document, each fetched by its index from .../attachments/{index} when it is embedded. |
DocumentAttachment
| index* | integer | |
| id | string | |
| description | string | |
| filename | string | |
| mime | string | |
| url | string | url is where the file is, when it is linked to and not embedded. |
| embedded* | boolean | |
| size | integer | size 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* | string | Ett av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE |
| type_code | string | type_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* | string | EN 16931 BT-1 |
| issue_date* | string | EN 16931 BT-2 |
| due_date | string | |
| tax_point_date | string | tax_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_code | string | |
| currency* | string | EN 16931 BT-5 |
| tax_currency | string | tax_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_currency | number | A decimal number, with the decimals it has. |
| buyer_reference | string | One of buyer_reference and order_reference is required by Peppol. |
| order_reference | string | EN 16931 BT-13 |
| sales_order_reference | string | EN 16931 BT-14 |
| contract_reference | string | EN 16931 BT-12 |
| project_reference | string | EN 16931 BT-11 |
| receipt_reference | string | EN 16931 BT-15, the receiving advice |
| despatch_reference | string | EN 16931 BT-16 |
| tender_reference | string | EN 16931 BT-17 |
| object_reference | Identifier | EN 16931 BT-18, what the invoice is about |
| accounting_reference | string | accounting_reference (BT-19) is where the buyer books the invoice. |
| billing_references | lista av BillingReference | billing_references (BG-3) name the invoices a credit note credits, or an invoice corrects. |
| note | string | EN 16931 BT-22 |
| period | Period | EN 16931 BG-14 |
| seller* | Party | |
| buyer* | Party | |
| payee | Payee | EN 16931 BG-10, when not the seller |
| tax_representative | TaxRepresentative | EN 16931 BG-11 |
| delivery | Delivery | EN 16931 BG-13 |
| payment | Payment | |
| lines* | lista av Line | |
| allowances | lista av AllowanceCharge | EN 16931 BG-20 |
| charges | lista av AllowanceCharge | EN 16931 BG-21 |
| prepaid_amount | number | prepaid_amount (BT-113) has been paid already; rounding_amount (BT-114) rounds what remains to an amount that can be paid. |
| rounding_amount | number | A decimal number, with the decimals it has. |
| attachments | lista av Attachment | EN 16931 BG-24 |
DocumentInShort
| type* | string | |
| number* | string | |
| issueDate* | string | |
| dueDate | string | |
| currency* | string | |
| seller* | string | |
| buyer* | string | |
| lines* | integer | |
| payableAmount* | string |
DocumentResponse
DocumentResponse is what one party said of a document to the other.
| code* | string | code is the status: AB, IP, UQ, CA, RE, AP or PD. |
| reasonCode | string | |
| reason | string | |
| at* | string (date-time) | |
| sent* | boolean | sent says the company sent it; otherwise it was received. |
DocumentSummary
DocumentSummary is a document as lists show it.
| id* | string | |
| direction* | string | Ett av: inbound, outbound |
| type* | string | Ett av: INVOICE, CREDIT_NOTE, DEBIT_NOTE, PREPAYMENT_INVOICE, SELF_BILLING_INVOICE, SELF_BILLING_CREDIT_NOTE |
| state* | string | Ett av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received |
| source | string | source is "ubl" for a document uploaded as finished UBL. |
| number* | string | |
| issueDate* | string | |
| dueDate | string | |
| currency* | string | |
| payableAmount* | string | |
| counterparty* | Counterparty | |
| error | string | error says why a failed or unconfirmed document is in that state. |
| warnings | lista av Warning | warnings 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. |
| response | DocumentResponse | response 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* | string | state is pending, running (parts are being written), ready or failed. |
| direction | string | direction, from and to are what the export was narrowed to. |
| from | string | |
| to | string | |
| pdf* | boolean | pdf says the documents are drawn as pages too. |
| documents* | integer | documents is how many are written so far. |
| parts* | lista av ExportPart | parts are the zip files, fetched from /exports/{id}/parts/{number} once the export is ready. A large archive comes in several. |
| error | string | |
| createdAt* | string | |
| completedAt | string |
ExportInput
ExportInput says which documents an export is of. Every document but drafts, which are not in the archive yet, unless narrowed.
| direction | string | direction is inbound or outbound; empty is both. |
| from | string | from and to bound the issue date, inclusive, as YYYY-MM-DD. |
| to | string | |
| boolean | pdf 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 | |
| rule | string |
FileUpload
| filename* | string | |
| mime* | string | |
| description* | string | |
| size* | integer |
Finding
Finding is one result of validating a document against the Peppol rules.
| severity* | string | severity is "fatal" for what makes the document invalid, "warning" for what does not. |
| rule* | string | |
| location* | string | |
| message* | string | |
| layer* | string | layer 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 string | emails 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).
| scheme | string | |
| value* | string |
Import
Import is a file drafts are made from.
| id* | string | |
| state* | string | state is pending while the drafts are made, then done or failed. |
| filename | string | |
| kind* | string | kind is spreadsheet, pages (a PDF or image read by a model) or document (an e-invoice). |
| documents* | lista av string | documents are the ids of the drafts made, one an invoice. |
| problems* | lista av ImportProblem | problems are what could not be read, by row for a spreadsheet; the invoices of the other rows are made all the same. |
| error | string | error says why nothing could be made, when the import failed. |
| createdAt* | string | |
| updatedAt* | string |
ImportProblem
ImportProblem is something an import could not read.
| row | integer | row is the spreadsheet's row, the header being row 1. |
| column | string | |
| message* | string |
ImportUploadRequest
ImportUploadRequest asks where to put a file too large to send to the API itself.
| contentType* | string | |
| size* | integer | size is the file's, in bytes. |
Line
| id | string | EN 16931 BT-126 |
| note | string | EN 16931 BT-127 |
| name* | string | name is what is sold (BT-153); description says more about it (BT-154). |
| description | string | |
| quantity* | number | EN 16931 BT-129 |
| unit | string | unit is a UN/ECE Recommendation 20 code; C62 ("one") when empty. |
| unit_price* | number | unit_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_quantity | number | A decimal number, with the decimals it has. |
| gross_price | number | gross_price (BT-148) is the price before discount, shown for information; the discount (BT-147) is its difference from unit_price. |
| allowances | lista av Adjustment | EN 16931 BG-27 |
| charges | lista av Adjustment | EN 16931 BG-28 |
| vat* | VAT | |
| period | Period | EN 16931 BG-26 |
| order_line_reference | string | EN 16931 BT-132 |
| accounting_reference | string | EN 16931 BT-133 |
| object_reference | Identifier | EN 16931 BT-128 |
| item_code | string | EN 16931 BT-155, the seller's |
| buyer_item_code | string | EN 16931 BT-156 |
| standard_item_id | Identifier | EN 16931 BT-157, such as a GTIN |
| classifications | lista av Classification | EN 16931 BT-158 |
| origin_country | string | EN 16931 BT-159 |
| attributes | lista av Attribute | EN 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* | string | peppolId is scheme:value, such as 0007:5561234567. |
| registered* | boolean | registered is whether anything is registered under the ID. A search for an ID that nobody has answers with it, not registered. |
| name | string | |
| countryCode | string | |
| invoice* | boolean | What the company has said it receives. |
| creditNote* | boolean | |
| selfBillingInvoice* | boolean | |
| selfBillingCreditNote* | boolean | |
| documentTypes* | lista av string | documentTypes are the identifiers of everything it receives. |
Party
| name* | string | name 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_name | string | |
| identifiers | lista av Identifier | identifiers (BT-29, BT-46) are other ways the party is identified. A buyer has at most one. |
| registration_id | string | registration_id is the legal registration number (BT-30, BT-47), such as an organisation number, in registration_scheme if that is given. |
| registration_scheme | string | |
| tax_id | string | tax_id is the VAT number with its country prefix (BT-31, BT-48). |
| tax_registration | string | tax_registration (BT-32, seller only) is a local tax registration, or a reference to one: in Sweden "GODKÄND FÖR F-SKATT". |
| legal_info | string | legal_info (BT-33, seller only) is what law requires stated, such as share capital or registered office. |
| peppol_id* | string | peppol_id is the party's electronic address, as scheme:value. |
| address* | Address | |
| contact | string | |
| phone | string | |
| string |
Payee
Payee receives the payment when that is not the seller.
| name* | string | |
| identifier | Identifier | |
| registration_id | string | |
| registration_scheme | string |
Payment
Payment says how the invoice is to be paid.
| means_code | string | means_code is a UNCL4461 code (BT-81); 30, credit transfer, when empty. means_text (BT-82) says it in words. |
| means_text | string | |
| reference | string | reference (BT-83) is what the payer quotes so the payment is matched. |
| terms | string | EN 16931 BT-20 |
| accounts | lista av Account | accounts (BG-17) are where a credit transfer goes. |
| card | Card | EN 16931 BG-18 |
| direct_debit | DirectDebit | EN 16931 BG-19 |
Period
| start_date | string | |
| end_date | string |
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 | |
| field | string |
ReceivingRequest
Types the handlers read that are worth a name.
| receive* | boolean | receive 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* | string | code is the status: AB, IP, UQ, CA, RE, AP or PD. |
| reasonCode* | string | reasonCode and reason say why; a query, a condition or a rejection must give a reason code. |
| reason* | string | |
| effectiveDate* | string | effectiveDate 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* | string | id is the scheme's code in the endpoint scheme list, such as "0007". |
| label* | string | label names the identifier as its holders know it. |
| vat | boolean | vat 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 | |
| detail | string |
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* | string | format is what the document was written in: ubl, cii, factur-x or fatturapa. |
| document* | DocumentContent | document 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* | string | format is what the document was written in: ubl, cii, factur-x or fatturapa. |
| unreadable | string | unreadable says why the document could not be read at all. |
| valid* | boolean | |
| rulesChecked* | boolean | rulesChecked 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 | |
| summary | DocumentInShort | summary is the document in short, for showing. |
| recomputed | lista av Difference | recomputed 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 string | lineAmounts is each line's net amount, in line order. |
| vat* | lista av VatSubtotal |
Validation
| valid* | boolean | valid says the document has no field errors and breaks no rule that was checked. |
| rulesChecked* | boolean | rulesChecked says whether the Peppol rules were asked. They are not for a document with field errors, which come first. |
| validation* | lista av FieldError | validation lists the field errors of a document given as JSON. |
| findings* | lista av Finding | findings are what the Peppol rules say. |
| unreadable | string | unreadable says why a document given as UBL could not be read. |
| totals | Totals | |
| ubl | string | ubl is the document as UBL, when it was given as JSON and has no field errors. |
VAT
| category* | string | category is a UNCL5305 code: S, Z, E, AE, K, G, O, L, M or B. |
| rate* | number | A decimal number, with the decimals it has. |
| exemption_reason_code | string | exemption_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_reason | string |
VatCheck
VatCheck is what VIES says of a number.
| countryCode* | string | |
| vatNumber* | string | |
| valid* | boolean | |
| name | string | name and address are the holder's, where the member state gives them. |
| address | string | |
| checkedAt* | string | checkedAt 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 string | standard is the standard rate, followed by any regional standard rate. |
| other* | lista av string | other is every reduced, super-reduced, parking and zero rate, highest first. |
VatSubtotal
| category* | string | |
| rate* | string | |
| exemptionReasonCode | string | |
| exemptionReason | string | |
| 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* | boolean | needed says the company waits to be verified. A company in test mode needs not be. |
| status | string | status 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* | string | code 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* | string | peppolId is the id watched, as scheme:value. |
| name | string | name is what the company calls the party. |
| string | email is where the company is told when the party appears. | |
| createdAt* | string | |
| checkedAt | string | checkedAt is when the network was last asked. |
| found* | boolean | found says the party is registered now: since foundAt, as registeredName, receiving receives (invoice, credit-note, ...). |
| foundAt | string | |
| registeredName | string | |
| receives* | lista av string |
WatchRequest
WatchRequest puts a watch on a party.
| peppolId* | string | peppolId is the id to wait for, as scheme:value. |
| name | string | name is what the company calls the party, for its own reading. |
| string | email 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 string | events are the event types delivered; empty means all of them. |
| enabled* | boolean | |
| secret* | string | secret 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 | |
| documentId | string | |
| attempt* | integer | |
| at* | string | |
| delivered* | boolean | |
| status | integer | status is the HTTP status the receiver answered with, if it answered. |
| error | string |
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* | string | Ett av: draft, queued, sending, delivered, unconfirmed, invalid, failed, received |
| number* | string | |
| issue_date* | string | |
| currency* | string | |
| payable_amount* | string | |
| counterparty* | object | |
| error | string | |
| warnings | lista av Warning | warnings are what looked wrong about a received document. |
| response | DocumentResponse | response is the latest Invoice response about the document. |
WebhookEvent
WebhookEvent is what a webhook is sent.
| id* | string | |
| type* | string | Ett 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 | |
| name | string | name is what the company called the party; registered_name what it is registered as. |
| registered_name | string | |
| receives* | lista av string |
WebhookRequest
Types the handlers read that are worth a name.
| url* | string | url is where events are delivered: an https address on the public internet. |
| events | lista av string | events are the event types to deliver; all of them when empty. |
| enabled | boolean | enabled is true unless given as false. |