If you have any questions, please contact us at apisupport@storecove.com. |
Subscribe to our statuspage on https://storecove.statuspage.io/
|
1. Introducing Storecove
Storecove is the only international operating Service Providers that offers a one-stop e-invoicing solution for eReporting (CTC - for many countries in the world) and eInvoicing (sending your invoice - via OpenPeppol, DBNAlliance, legacy EDI networks or email). Large companies and ERP systems can connect with all worldwide available e-invoicing networks. By supporting every global invoice format we ensure that you only need to connect through a single connection with a single data format. Development departments worldwide love our solution. Try us today and test for free!
1.1. Getting Started
This guide will help you get started with the Storecove API in under 5 minutes.
1.1.1. Register for API access
To obtain access to our developer sandbox API environment, request a developer sandbox account here:
1.1.2. Create an API key
Create a new API key by clicking the "Create New API Key" button.
1.1.3. Make your first API call
Create a file "discovery.json" with the following contents (these are both Storecove Test Identifiers):
{
"documentTypes": ["invoice"],
"network": "peppol",
"metaScheme": "iso6523-actorid-upis",
"scheme": "de:lwid",
"identifier":"10101010-STO-10"
}
or, for the DBNAlliance network, use
{
"documentTypes": ["invoice"],
"network": "dbnalliance",
"metaScheme": "iso6523-actorid-upis",
"scheme": "gln",
"identifier":"1200109963131"
}
Call the API with your API key to check whether this participant identifier can receive invoices on the exchange network of choice. The example below will perform the check:
curl \
-X POST "https://api.storecove.com/api/v2/discovery/receives" \
-H "Accept: application/json" \
-H "Authorization: Bearer API_KEY_HERE" \
-H "Content-Type: application/json" \
--data @discovery.json
Swap the "API_KEY_HERE" for the API key you created. Don’t remove the "Bearer" prefix! |
Since Storecove can receive invoices on both identifiers, the response is
{
"code": "OK",
"email": false
}
The "code" field with value "OK" indicates this identifier can receive invoices. Ignore the "email" property for now.
1.1.4. Create a sender
The first step in sending an invoice is to create a sender. This sender is called a "LegalEntity". LegalEntities can both send and receive, but for now we will focus on their sending role. Although the LegalEntity we are creating now can contain dummy data, you should carefully choose the LegalEntity’s country, because this will be important for the contents of the invoice.
For SG, IT, FI (Finvoice), ES (Face, FaceB2B) and PT additional setup steps are required and so to test this you need to contact us first. |
Creating a LegalEntity is done in the UI, on
In the UI you will be guided as to which participant identifiers to add to the LegalEntity.
Once created you will see the legalEntityId in the UI. You will need this id in the next step. Note that it can take up to a day for Storecove to approve the LegalEntity.
1.1.5. Send your first invoice
Having created our sender, we now choose the sender/receiver combination and create a file "invoice.json" with the appropriate contents.
We have a list of test identifiers that we advertise on the different exchange networks that these test invoices will get sent to. So simply click on the right scenario and copy/paste!
Receiver |
||||||||||
Sender |
EU/EEA |
SG |
AU/NZ |
FI |
IN |
JP |
SA |
US |
World |
|
EU/EEA |
|
|
|
|
|
|
|
|||
SG |
|
|
|
|
|
|
|
|
||
AU/NZ |
|
|
|
|
|
|
|
|||
FI |
|
|
|
|
|
|
|
|
||
IN |
|
|
|
|
|
|
|
|||
JP |
|
|
|
|
|
|
|
|
||
SA |
|
|
|
|
|
|
|
|
||
US |
|
|
|
|
|
|
|
|
||
World |
|
|
|
|
|
|
|
|
Swap the "LEGAL_ENTITY_ID" in the JSON for the id you received when creating the LegalEntity. |
Next use this API call to send the invoice:
curl \
-X POST "https://api.storecove.com/api/v2/document_submissions" \
-H "Accept: application/json" \
-H "Authorization: Bearer API_KEY_HERE" \
-H "Content-Type: application/json" \
--data @invoice.json
The result will be similar to:
{
"guid": "c65d43d1-4b44-40a9-8926-6743f9fc90b2"
}
1.1.6. Sent! (Retrieve the Sending Evidence)
Congratulations! You’ve successfully submitted an invoice for sending. If you have configured Webhooks we will let you know the progress of the sending process that way. If you have not yet configured any webhooks, you can track the progress in the UI, on
When you see it has been successfully sent (or you have received a webhook, but in this Getting Started guid we have not done that) you can retrieve the evidence for that by calling
curl \
-X GET "https://api.storecove.com/api/v2/document_submissions/c65d43d1-4b44-40a9-8926-6743f9fc90b2/evidence" \
-H "Accept: application/json" \
-H "Authorization: Bearer API_KEY_HERE" \
-H "Content-Type: application/json"
(Change the GUID to the one you received when sending the invoice.) This will give you the exact invoice sent, as well as the digital signature from the receiving accesspoint or tax authority. Or, if the invoice was sent via email, it will give you the full email that was sent with its attachments as well are response from the receiving SMTP server.
What if my Customer is not on one of the Exchange networks (Peppol, DBNAlliance)?
Then we can send an email with an electronic invoice attachment that is appropriate for the country your Customer is in. For instance, in de Germany we would send a ZUFGFeRD attachment, in France Facture-X and in Italy a FatturaPA. For India, the GSTN-signed JSON with a PDF that includes the QR code will be attached. Your receiver will know how to process these!
To test the email scenario, simply include a valid email address in the examples above and leave the "eIdentifiers" array empty, like this:
{
"routing": {
"emails": [
"test@example.com"
],
"eIdentifiers": []
}
}
The email address must be valid. Do not test with invalid email addresses. |
We recommend using the account you’ve just created for all your development purposes. When you’re ready to launch your integration, create a new account and reach out to our support to convert to 'production' API keys!
2. Using the API
The Storecove API provides all your e-invoicing and Peppol integration needs. This section outlines everything you need to use the V2 API, which is available at https://api.storecove.com/api/v2/.
You cannot click this URL, because it is an API endpoint, not a page that can be viewed in a browser. |
2.1. API keys
To call the Storecove V2 API, you will first need an API key from the developer portal. An API key represents your application, so if you’re building multiple solutions you’ll need multiple keys.
API keys secrets, so do not publish them in a public config such as to frontend JavaScript applications. |
To do this, navigate to API Keys in your Storecove admin panel. You will typically need only one, however you can create multiple for use with different environments, migrations or when rotating secrets.
The API Key must be provided in the Authorization header using the Bearer scheme for all API requests.
Authorization: Bearer API_KEY_HERE
For instance, a curl request could look like
curl \
-X POST "https://api.storecove.com/api/v2/legal_entities" \
-H "Accept: application/json" \
-H "Authorization: Bearer API_KEY_HERE" \
-H "Content-Type: application/json" \
-d "{ \"party_name\": \"Test Party\", \"line1\": \"Test Street\", \"city\": \"Test City\", \"zip\": \"Zippy\", \"country\": \"NL\", \"tenant_id\": \"my_id\"}"
These headers are safe inside the TLS tunnel that protects the Storecove API.
2.2. Webhooks
Webhooks allow you to be notified of certain events taking place on the Storeove platform. There are two types:
-
Push mode
Push mode allows you to receive notifications without the need for polling. They consist of a URL that is called with a POST body, optionally protected with HTTP Basic Authentication or a custom HTTP header.
You should reply with an HTTP OK (200) to the POST. If another status code is presented, or we fail to reach the specified URL, we will retry again at a later time for a total of 5 days.
We will keep calling the webhook until we receive an HTTP 200 from you, but only for 5 days.
During development, the following site may prove useful for viewing the webhooks we call:
https://webhook.site
-
Pull mode
Pull mode (aka FIFO queue) webhooks are typically used when the system that needs to receive them does not have a service to receive them. In pull mode, you use the
endpoint to retrieve a new webhook off the queue. After processing it successfully, DELETE it using
and GET the next one. When you receive an HTTP 204 response, the queue is empty and your polling process can sleep for a while.
2.3. API tools
There are several types of tools that can speed up your solution development. We publish an Open API v2 (a.k.a. Swagger) specification that allows you to generate client libraries and test API calls using API clients like Postman.
2.3.1. Client Libraries
The API is RESTful and communicates through JSON, so you can easily create your own client if we don’t have one ready to go and you don’t want to leverage the OpenAPI 2.0 API specification (see below).
The easiest way to create a client for your favourite language is by leveraging our OpenAPI 2.0 (previously known as Swagger) specification, which can be found on
There are many generic REST clients for available for different platforms. However, if you wish to roll your own, or would like to quickly generate the model classes, you could use Swagger Codegen.
2.3.2. Postman
Using our OpenAPI 2.0 specification, it is easy to test drive the API, for instance with Postman:
Click "Import," select "Import From Link," and copy/paste our OpenAPI 2.0 specification URL:
Next, click on the "Headers" tab and copy/paste the API token. You are now ready to test drive the API!
2.3.3. Swagger Codegen
This tool makes it easy to to generate a client library in your favorite language:
First, download the lastest version 2 Java jar:
wget --output-document=swagger-codegen-cli.jar https://repo1.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.24/swagger-codegen-cli-2.4.24.jar
Next, create the client library (in this example we generate a C# library):
java -jar swagger-codegen-cli.jar generate -i https://api.storecove.com/api/v2/openapi.json -l csharp -o csharp
Language support is extensive, amongst others:
-
C# (csharp, csharp-dotnet2)
-
Java (java-pkmst, java-play-framework, jaxrs-resteasy-eap)
-
Node.js (nodejs-server)
-
Objective-C (objc)
-
Android (android)
-
Perl (perl)
-
PHP (php, php-symfony, php-silex)
-
Python (python)
-
Many others, execute:
java -jar swagger-codegen-cli.jar langs
2.4. camelCase or snake_case?
When POSTing data, we allow both the use of (lower) camelCase (sometimes called dromedaryCase ) and snake_case (see Multiple-word identifier formats). So if you see them used interchangeably in our documentation, that is not something to worry about. Choose your favourite way!
When you GET data, we always send you snake_case for object properties.
3. Building Your Solution
3.1. Environments
We have two different environments:
-
Sandbox
-
Production
The Sandbox environment allows you to implement the Storecove solution. It has the following features:
-
Webhook simulation
It allows you to simulate webhooks. Webhooks are how we notify you of events that have taken place asynchronously (see Webhooks). You can simulate receiving a document, or receiving status feedback on a document that you have sent.
-
Test exchange networks
The sandbox environment is linked to test exchange networks or tax authorities:
-
OpenPeppol
-
DBNAlliance
-
Italy SDI (simulated)
-
India GSTIN
-
Poland KSeF
-
Portugal eSPap
-
Spain FACe and FACeB2B
-
Finland Finvoice
So you can use the sandbox environment to see what would happen in the production environment.
-
We recommend always having both environments. So you start in sandbox and then for production you create a second account. That way, you can continue to test and develop without affecting your production environment.
3.2. Legal Entities
3.2.1. Actors
Legal entities are the actors between whom documents are exchanged. If you are sending an invoice, the sender is a legal entity and the receiver is a legal entity.
LegalEntities have two important properties:
{
"acts_as_sender": true,
"acts_as_receiver": true
}
When the flag "acts_as_receiver is set, it’s identifiers will be advertised on the Exchange networks OpenPeppol and/or DBNAlliance. That means you will automatically start receiving documents (usually invoices) via those networks. When the flag "acts_as_sender" is set, the LegalEntity can also send documents. So with a single LegalEntity, you can send documents to the whole world as well as receive documents from the whole world!
LegalEntities are created in the user interface on https://app.storecove.com/.
3.2.2. Identifiers
Types
There are three types of identifiers involved, although not always all of them:
-
Business Identifiers
-
Legal Identifiers
A legal identifier identifies the legal entity from a legal perspective. It can be a local chambre of commerce number, or a DUNS, GLN, etc. However, in many countries the tax identifier is also the legal identifiers. In that case you don’t need to set this up separately.
-
Tax Identifiers
A tax identifier identifies the legal entity from a tax perspective. In the EU, all tax identifiers are VAT numbers and are prefixed with the ISO3166-2 country code, e.g. "IT12345678901". In India, the tax identifier is issued by the state in which the LegalEntity resides. It’s first two digits are always the numercial code of the state that issued it.
-
-
Routing identifiers
A routing identifier is used to route the electronic document to the receiver. The good news is that, with a few exceptions, most routing identifiers are business identifiers! An obvious exception is an email address. When the invoice is routed to an email address, that is not one of the business identifiers. But most of the time, you do not need to store routing identifiers separately.
Structure
Identifiers consist of two parts:
-
scheme
-
identifier
The scheme defines the type of identifier. For instance, the Italian VAT number "IT12345678901" has scheme IT:IVA. A New Zealand tax identifier has the scheme "NZ:GST". Most schemes are prefixed with an ISO3166-2 country code, but not all. Examples are LEI (the global Legal Entity Identifier) GLN and DUNS.
Which identifiers for my LegalEntity?
After creating the LegalEntity, you will need to add one or more business identifiers. The relevant ones will automatically be advertised on the various exchange networks by us. (If you want to create sending-only LegalEntities, please contact us.)
The list of identifers to add to your LegalEntity can be found here:
3.2.3. Additional Tax Identifiers
There are two legal territories where additional tax identifiers are relevant:
-
EU
In the EU, when (1) a LegalEntity sends an invoice to a consumer in a receiver country different from the sender country and (2) that LegalEntity is above the threshold for that receiver country, the sender is required to apply for a VAT number in the receiver country. And that VAT number must be used in the invoice.
-
IN
In India, when a LegalEntity sends an invoice to a receiver in a state different from the sender state, the sender is required to apply for a GST number in the receiver state. And that GST number must then be used in the invoice.
This is where additional tax identifiers come in. The LegalEntity will already have a primary tax identifier, which is the one that was issued by the country in which it is located. On top of that, AdditionalTaxIdentifiers can be created created according to the following rules:
-
EU
-
You can have only one AdditionalTaxIdentifier per EU country
-
You cannot create an AdditionalTaxIdentifier for the LegalEntity’s home country, because that is the LegalEntity’s primary tax identifier.
-
-
IN
-
You can have only one AdditionalTaxIdentifier per state
-
You cannot create an AdditionalTaxIdentifier for the LegalEntity’s home state, because that is the LegalEntity’s primary tax identifier.
-
To activate this feature, for invoices that require the use of an AdditionalTaxIdentifier, you must set the "consumerTaxMode" property in the Invoice object to true.
3.3. Sending Documents
3.3.1. Sending Workflow
Invoice Sending Workflow
The sending workflow for invoices consists of the following phases:
-
CTC Compliance
-
Tax Compliance
-
Exchange Networks
-
Static Routes
-
Email
1. CTC Compliance
In the compliance phase, we look at requirements that may exist in certain countries for sending invoices. The following CTC models exist:
-
V-flow
In this flow, the tax authority is the central organization through whom the invoice is sent. See, for instance, Italy:
Note that you can simply provide the Storecove JSON and we will take care of generating the format required by the tax authority. For Italy we will generate the FatturaPA format.
Other countries that have this model are-
Poland
-
Romania
-
France (OD model; to be launched in 2025)
-
-
Y-flow
There are two types of Y-flow:
-
Hard Clearance Y
In the hard clearance Y-flow, the invoice must first be approved by a tax authority. Usually, this involves receiving a digital signature, often in the form of a QR-code. When we receive a QR-code, this is automatically stamped inside any PDF, if present and special anchors are present in the PDF (for details, see PDF Stamping). We will also ensure the digital signature is added to any eInvoice, e.g. when sending via OpenPeppol or DBNAlliance.
India is an example of a country with this flow:
-
Reporting Y
In the reporting Y-flow, the tax authority wants to receive a summary or full copy of the invoice. Although this can be done after sending, it is our policy to first successfully send to the tax authority, before delivery to the receiver. This prevents cases where there are issues with reporting the invoice to the tax authority, but it has already been sent.
-
If a CTC-reporting requirement exists in a country, and you have the necessary addon active in your subscription, the flow will be automatically applied. (Note that in sandbox mode all addons are considered to be active.)
2. Tax Compliance
We work closely with our partner (VATCalc) to ensure the invoice will be part of your tax filing (for example mini SAF-T). An invoice that was successfully eReported (if required) is in this step automatically made part of you next tax filing. This way you will never see differences between your tax filing and eInvoicing! Contact us if you are interested in learning more about how this works.
3. Exchange networks
If the invoice was not sent through one of the previous two phases, exchange networks are next on the list. We currently support OpenPeppol and the US-based DBNAlliance. If the receiver is a member of one of these exchange networks, the invoice will automatically be transported through that network.
4. Static routes
We support a limited number of statically routed networks. Static routes are discouraged, because they require one-to-one setup between the sender and the receiver and are therefore not as scaleable as exchange networks. If you have a receiver on a statically-routed network, we recommend you first try to migrate the receiver to an exchange network. However, if that is not possible, statically routed networks can be supported. Below is an example for the legacy Finvoice network commonly used in Finland:
5. Email
If none of the previous phases resulted in the invoice being sent, and an email address was provided in the routing object, the invoice will be sent to that email address. That email will contain one or more attachments, the contents of which depends on the country of the receiver. For instance, in Germany/France we will send ZUGFeRD/Factur-X, in Italy FatturaPA, etc.. Also the language of the email will be appropriate for the country of the receiver.
If you do not provide an email address, and we could not send the invoice in any other way, we will respond with an HTTP 422 Unprocessable Entity with a body "No action taken".
3.3.2. Sending a document
There are two main ways to submit a document to be sent:
-
A JSON object that contains the document data
-
(only for invoices) A Base64 encoded string embedded in a JSON that contains the document data in a certain syntax, such as UBL, CII, SAP IDOC, Microsoft Dynamics/Business Central, cXML, etc. In this case, we will parse the document and transform it into the JSON object our API requires, so it is an additional tranformation step.
The following document types can currently be sent:
-
Invoice
-
Invoice Reponse
-
Order
Invoice
The Invoice document (Invoice) has several sections:
-
Tax system
-
General data
-
Modifiers
-
Parties
-
References
-
Delivery details
-
Payment
-
Allowances and charges
-
Invoice lines
-
Amounts
Each will be discussed in more detail below.
Tax System
The tax system of an invoice is the first and most important choice when creating an invoice. There are two tax systems that can be used:
-
tax_line_percentages
-
tax_line_amounts
The TL;DR is that most receivers only support tax_line_percentages, so if at all possible, create invoices using that tax system.
To explain the difference, let’s look at an example. A typical invoice with three lines and one allowance and one charge could look like this:
tax_line_percentages | |||
---|---|---|---|
Item |
Excluding tax |
Tax % |
Tax amount |
Line 1 |
$819.50 |
15% |
|
Line 2 |
$2,739.00 |
15% |
|
Line 3 |
$6,600.00 |
15% |
|
Charge 1 |
$40.00 |
25% |
|
Allowance 1 |
-$461.75 |
15% |
|
Total |
$9,736.75 |
||
TaxSubtotal 15% |
$9,696.75 |
15% |
$1,454.51 |
TaxSubtotal 25% |
$40.00 |
25% |
$10.00 |
Total Tax |
$1,464.51 |
||
Total including tax |
$11,201.26 |
The same invoice in tax system tax_line_amounts would be:
tax_line_amounts | |||
---|---|---|---|
Item |
Excluding tax |
Tax % |
Tax amount |
Line 1 |
$819.50 |
15% |
$122.93 |
Line 2 |
$2,739.00 |
15% |
$410.85 |
Line 3 |
$6,600.00 |
15% |
$990.00 |
Charge 1 |
$40.00 |
25% |
$10.00 |
Allowance 1 |
-$461.75 |
15% |
-$69.26 |
Total |
$9,736.75 |
||
TaxSubtotal 15% |
$9,696.75 |
15% |
$1,454.52 |
TaxSubtotal 25% |
$40.00 |
25% |
$10.00 |
Total Tax |
$1,464.52 |
||
Total including tax |
$11,201.27 |
Notice the 1ct difference in the 15% tax subtotal and then in the invoice total. If the invoice data you give us is tax_line_amounts, but the receiver only supports tax_line_percentages, we will convert this as follows:
tax_line_amounts – converted | |||
---|---|---|---|
Item |
Excluding tax |
Tax % |
Tax amount |
Line 1 |
$819.50 |
15% |
$122.93 |
Line 2 |
$2,739.00 |
15% |
$410.85 |
Line 3 |
$6,600.00 |
15% |
$990.00 |
Charge 1 |
$40.00 |
25% |
$10.00 |
Allowance 1 |
-$461.75 |
15% |
-$69.26 |
Rounding line 15% |
-$0.07 |
15% |
-$0.01 |
Total |
$9,736.68 |
||
TaxSubtotal 15% |
$9,696.68 |
15% |
$1,454.51 |
TaxSubtotal 25% |
$40.00 |
25% |
$10.00 |
Total Tax |
$1,464.51 |
||
Total including tax |
$11,201.19 |
||
Payable rounding amount |
-$0.08 |
||
Total amount payable |
$11,201.27 |
General Data
Under general invoice data we find:
-
invoice number
-
issue date
-
tax date
Note that in many countries the tax date must be the same as the issue date, so if you provide this make sure it is correct.
-
due date
-
period
-
note
-
issue reaons
The issue reasons are only used in invoices for Italian receivers. They correspond to the <Causale> elements.
Modifiers
When you send a creditnote, you should simply provide negative amounts to make for a negative invoice total. When we see the invoice has a negative total, we will normally try to send it as a creditnote. But whether that is actually done depends on the receiver. If the invoice is sent via an exchange network such as OpenPeppol, we will send a creditnote if the receiver advertises that. Otherwise, we will send an invoice with negative amounts. When sending via email, we will do it in a way that is customary in the receiver’s country.
In some cases, even though the total invoice amount is negative, you may prefer to send a regular invoice anyway. For instance, energy providers may send a regular invoice with a single negative adjustment that is larger than the regular invoice amount and thus the total become negative. But it is still considered a regular invoice, not a creditnote. That beharvious can be controlled through this property.
Self Billing Mode essentially means the sender and receiver are reversed. The sender creates an invoice on behalf of the receiver and send it. We currently only support this via email. The OpenPeppol network supports self billing only for AU/NZ and JP. We only support this for invoices inside a country, i.e. not for cross-border invoices.
Parties
We support the following parties involved in the invoice:
-
the sender
-
the receiver
The sender ("AccountingSupplierParty" in UBL parlance) is identified by the id of the LegalEntity that you created. So most sender data for the sender is taken from that. However, there are a few fields that you can control dynamically per invoice, all related to the contact. That allows you to specify different contact details per invoice, for example when invoices are issued by different departments that have different contact points in case of questions.
The receiver ("AccountingCustomerParty" in UBL parlance) consists of the following blocks:
-
name
-
address
-
identifiers
-
contact
The identifiers should contain (where applicable) the legal identifier and the tax identifier of the receiver, according to this list:
References
The references array is a flexible way to link the invoice to other documents, like a purchase order, delivery note, other invoice, etc. The most important one is the "purchase_order" which becomes the "OrderReference" element in a UBL invoice and which is what most governments use to automatically process the invoice. Without this, many invoices will get rejected.
The accounting cost field helps the receiver book the invoice against the correct general ledger account.
Delivery Details
Details regarding the delivery: to whom, where, when and how much.
Payment
Adding payment methods is relevant both when the invoice is still to be paid and when the invoice has already been paid. In the latter case, use the "prepaidAmount" property and set that to the amount already paid.
Not all formats allow multiple payment methods and not all payment methods are allowed in all formats. We will automatically ensure the most relevant are included, subject to what is possible. See also Globalization.
Invoice Lines
Invoice lines are complex objects in and of themselves. They consist of the following sections:
-
Textual Information
-
Amounts
-
Taxes
-
Period
-
Identifications
-
Key/value Pairs
An invoice line has a name and a description. The name is a short description of the item. The Description allows for describing the item and its features in more detail than the name.
You need to make sure that
The price and quantity can be specified up to 8 decimals. It is important not to round these down so the multiplication is precise. Otherwise, many invoice formats will reject your invoice.
Multiple Tax items is allowed only for IN (India) taxes. All other countries can only have a single Tax item in this array. For tax system "tax_line_percentages" a typical EU tax array might look like
[
{
"country": "DE",
"percentage": 6.0,
"category": "standard"
}
]
and for India:
[
{
"country": "IN",
"percentage": 14.0,
"category": "sgst"
},
{
"country": "IN",
"percentage": 14.0,
"category": "igst"
}
]
We will automatically package the data in such a way that it can be automatically processed by the receiver (see Globalization).
If you use the tax system "tax_line_amounts" an additional property "amount" is available on the tax object. But the percentage should always be present.
The start and end date this invoice line is for.
Three item identifications are available:
-
buyersItemIdentification
-
sellersItemIdentification
-
standardItemIdentification
If you use this identifier, a scheme is also mandatory. It defaults to GTIN (0160).
The invoice line id "lineId" can be used to reference this invoice line in other documents. It can be anything, but it is good practice to use an integer. You may run into problems with the receiver otherwise.
It is possible to add a reference to the lineId in the purchase order on which this invoice is based ("orderLineReferenceLineId"). But that purchase order can only be specified at the invoice level. In E-invoicing it is not considerered good practice to send a single invoice for multiple purchase orders. But you obviously can send multiple invoices for a single purchase order.
The accounting cost field helps the receiver book the invoice against the correct general ledger account.
It is possible to add arbitrary key/value pairs to the invoice line. The semantics of these are not defined, but if you have agreed that with your receiver these can be very relevant. Not all invoice formats support this, so they may get dropped. But if they are, that is the responsibility of the receiver who dictates the format.
Allowances and Charges
Allowances and charges are just simplified invoice lines. But tax-wise they share the same complexity. Not all receivers support these, so we advise to be careful using these. If necessary, we will transform them into invoice lines.
Summary Amounts
Only a single document currency can be used for all the amounts in the invoice. So you can not mix-and-match currencies accross invoice lines, specify prices in a different currency, etc. There is, however, one exception: you can specify the total amount of tax in a different currency if that is required for accounting purposes.
How you calculate the tax subtotals depends on the tax system.
-
tax_line_percentages
First, create a list of unique (country, category, percentage)-keys from all the tax objects in the invoice lines and allowances and charges. Next, for each key, sum the amountsExcludingTax from all the invoice lines in which that key appears. Finally, apply the percentage to that amount to get the tax amount.
-
tax_line_amounts
For this tax system the calcuation is performed by us.
You must also provide the total payable amount for the invoice. That should be the sum of all the invoice lines + the sum of all the taxes.
3.3.3. JSON Object
Invoice
The following gives the maximum JSON object for an invoice:
Invoice Response
The Invoice Response document (DocumentInvoiceResponse,DocumentInvoiceResponse), which you can send after receiving a purchase invoice, is very simple in its most basic form:
The "receiveGuid" property is the guid that you received in the received_invoice webhook. The "AP" response means the document was accepted.
A more complex example is
In this case, the invoice was rejected (RE) with reason "REF" (this means "References incorrect") and no further action on this invoice is expected ("NOA") since it was rejected and the defect cannot be repaired.
Order
The following gives the maximum JSON object for an order:
3.3.4. Webhooks for Sending
Invoice Submission
The invoice_submission is an event specific to the invoice document type, whereas the document_submission is more generic. Support for invoice_submission will be removed in a future release.
When an invoice submission is complete (more specifically all its actions have executed) we make a request to your webhooks in the following format:
{
"event_type": "invoice_submission",
"guid": "f4624435-7fc4-4fc2-9379-dcb641d593dc",
"result": "failed",
"actions": [{
"type": "peppol",
"destination": "NL:VAT.NL012345678B01",
"result": "error"
}],
"tenant_id": "YourTenantId"
}
Possible results are:
-
succeeded
-
failed
-
no_action_taken
The result 'no action taken' is sent when none of the Peppol identifiers were available on the Peppol network and no fallback email address was provided.
There are three types of actions:
-
peppol
-
edi
-
email
Each has the following possible results:
-
received
-
error
-
unknown
The status 'unknown' indicates that the result of the action is not yet known. This status is not actively notified, but if you request the invoice_submission status through our API, you may get this status.
We will normally take only one action, but if the action has failed we may retry and create a second, third etc. action until one succeeds.
An invoice submission is considered "succeeded" if one of its actions has status "received".
Document Submission
A webhook to convey the status for sent documents looks as follows:
{
"event_type": "document_submission",
"event_group": "invoice",
"event": "succeeded",
"v_delivery": true,
"details": "A textual representation of the event details, e.g. clarifications for Under Query",
"response_document": null,
"guid": "f4624435-7fc4-4fc2-9379-dcb641d593dc",
"idempotencyGuid": "7305ebe5-9a39-4981-9f98-c64e340f2886",
"tenant_id": "YourTenantId"
}
The following events and event_groups can be in the webhook:
Event Type | Event Group | Event | Meaning | Triggered By |
---|---|---|---|---|
document_submission |
invoice |
no_action_taken |
No recipients found to send the document to. |
Routing problem. Provide a valid destination. |
failed |
Could not send the document. This is a final state. |
Unrecoverable technical delivery problem. |
||
cleared |
Cleared by the sender’s tax authority. The next step is to send it to the receiver. |
A digital signature/QR code was obtained. Note that in some cases (currently KSA, PT) this QR code is generated by Storecove until the tax authority’s portal is ready. |
||
succeeded |
Received by corner 3 |
Receipt acknowledged by corner 3. |
||
The events below can only be received if the sender of the invoice advertises the Invoice Response document on the Peppol network (see Legal Entities) or when sending from an Italian LegalEntity. |
||||
acknowledged |
Received by corner 4 |
Receipt acknowledged by corner 4. |
||
in_process |
Processing by corner 4 started |
|||
under_query |
Under query by corner 4 |
|||
conditionally_accepted |
Conditionally accepted by corner 4 |
|||
rejected |
Rejected by corner 4 |
|||
accepted |
Accepted by corner 4 |
|||
partially_paid |
Partially paid by corner 4 |
|||
paid |
Paid by corner 4 |
|||
document_submission |
invoice_response |
no_action_taken |
No recipients found to send the document to. |
Routing problem. Provide a valid destination. |
failed |
Could not send the document. This is a final state. |
Unrecoverable technical delivery problem. |
||
succeeded |
Received by corner 3 |
Receipt acknowledged by corner 3. |
The "response_document" property is currently only present for
-
Peppol Invoice Response documents;
-
SDI (Italy) response documents ("Notifiche"), such as "NS" (Ricevuta di scarto, meaning the invoice was rejected), "MC" (Ricevuta di mancata consegna, meaning the invoice could not be delivered) and "Ricevuta NE/EC02" (the invoice was received but rejected).
Depending on the scenario, this property "response_document" may or may not be present and may have different contents. For an Invoice Response, the contents are defined by
For SDI, the contents are an array of error messages:
{
"errors": [
{
"code": "00306",
"description": "1.4.1.2 <CodiceFiscale> non valido : AAAAAA00A00A000A"
}
]
}
The field
{
"v_delivery": true
}
indicates that the delivery is assumed to have taken place by the local network, such as SDI. It is named after the V-delivery model ([v-flow-explained]). Further webhooks (e.g. Accepted by corner 4) may be sent, but it is also possible that no further webhooks are sent. The presence of this field indicates that there is only clearing evidence and no sending evidence can be retrieved.
3.3.5. Sending Evidence
After you have received a webhook saying the sending was successful, you can retrieve the evidence for that. That includes the exact document that we created for your receiver as well as evidence regarding the exchange. The endpoint for retrieving the evidence can be found on
3.3.6. Globalization
Storecove provides a single and unified API through which you can send and receive documents worldwide, without worrying about the different syntaxes in use in different regions. Simply provide us with the document data and our API automatically ensures that:
-
The documents we send for you are compliant with legislation in the sender’s country.
-
The document is routed to the receiver in the way they want.
-
The document we send can be processed by the receiver. This means the exact document we send will depend on the receiver and/or their country.
In order to do this, we have implemented the following features:
-
Compliance
In countries where the invoice to be sent requires approval of the local tax authority we ensure this approval is obtained before sending (e.g. India). This approval often takes the form of a (digitally signed) QR code. We can add that QR code to your PDF if applicable. In countries where the invoice to be sent requires a copy to be sent to the local tax authority we ensure this is done (e.g. Hungary).
-
Routing
-
Exchange Network Routing
When a receiver is a member of an exchange network (e.g. OpenPeppol, DBNAlliance) we will automatically route the invoice over that network.
-
Tax Authority Routing
In countries where the invoice has to be sent through a mandatory exchange network (e.g. SDI in Italy) we will automatically route the invoice through that network.
-
Public Entity Routing
In many countries the government has set up a portal service through which the invoices to the government are to be delivered. Storecove automatically takes care of that (e.g. France, Italy, Portual, Spain, Netherlands, Belgium, Germany)
-
Legacy Static Routing
When a receiver is not part of a discoverable exchange network like OpenPeppol or DBNAlliance, but is available on a private network such as Finvoice, SAP Ariba, Basware and others, a static route defining the channel and document format can be provided in the routing element. The receiver may also be on a legacy EDI (typically AS2 with EDIFACT or ANSI X12 810) connection, either directly or through a service provider, however, this is not supported because it requires a receiver-by-receiver setup.
-
Email Routing
When a receiver cannot be reached in any other way, an email with an electronic invoice attachment appropriate for that receiver’s country can be sent. For instance for Germany we send ZUGFeRD/XRechnung, for France Factur-X, for the US ANSI X12 810, etc.
-
-
Document Generation
Two challenges exist regarding the exact document to be sent.
-
Syntax
Inside a single legal territory (EU, US, AU/NZ ("Trans-Tasman") etc.) the format tends to be well-defined. However, that does not mean a single format can be used.
For instance in the EU (mostly through OpenPeppol) Germany has XRechnung in 2 syntaxes (UBL and CII) as well as ZUGFeRD. The Netherlands has SI-1.2, NLCIUS as well as Peppol BIS V3 with country rules. Belgium Has vanilla Peppol BIS V3. Sweden, Denmark, Norway and Greece all use the Peppol BIS V3 format, but with country rules. For now, only a single UBL syntax exists in AU/NZ, but that is a recent addition and versions are bound to emerge. In the US, the DBNAlliance has defined a UBL-based format. However, ANSI X12 810 is wide-spread.
-
Contents
An additional challenge arises when sending between these legal territories. Because of differences in tax systems and payment methods, not each invoice can be generated in each format. Therefore, a sender would need to be aware of these complexities and adjust the document to be sent accordingly. To alleviate these difficulties, we perform two conversions on the invoice to be sent:
-
Tax Conversion
Suppose you want to send invoice from AU to an EU country. In the AU, GST is used. So even if you create a sales invoice with 0% GST, this is still not something that can be used to generate a valid EU format invoice, which requires 0% VAT. We take care of this by automatically recognizing when you export an item from one legal territory to another, applying 0% tax, we will take care of generating a document that has 0% in such a way that the receiver’s format can be generated. If you have to charge a non-zero percentage this is not a problem. For AU, simply provide a 10% AU GST tax percentage and it will be converted to an additinal invoice line. Try it, it will work!
A second issue with tax is rounding. A more detailed discussion of that can be found under Tax System, but in short most receivers in the world expect the tax to be calculated and rounded at the invoice level, but some countries allow the tax to be calculated and rounded at the line level. In the latter model the line taxes do not add up to a perfect percentage of the invoice total and a valid invoice in the receiver’s format can not be created. We solve this by adding one or more rounding invoice lines that do not change the invoice total.
-
Payment Method Conversion
For payment methods, an equally complex situation exists. For instance, an AU sender may use Post Billpay as a payment mean, but that is not understood in the EU and most EU formats do not allow it. So we automatically convert this to an equivalent payment method that is valid in the EU, in this case a credit transfer.
-
Because of these complexities our service includes the generation of the document to be sent. The Sending Evidence endpoint is then used to retrieve the exact document sent to store for compliancy reasons.
-
3.3.7. Advanced Routing
In many cases, the routing identifier is the same as one of the receiver’s business identifiers. Some examples:
Country | X2Y | Network | Receiver Business Identifiers | Routing | |
---|---|---|---|---|---|
Legal Identifier |
Tax Identifier |
Routing Identifier(s) |
|||
DE |
B2B |
Peppol |
DE:VAT |
DE:VAT |
DE:VAT, fallback to email |
DE |
B2G |
Peppol |
DE:LWID |
DE:LWID |
|
FI |
B2B |
Peppol |
FI:OVT |
FI:VAT |
FI:OVT, fallback to email |
NL |
B2B |
Peppol |
NL:KVK |
NL:VAT |
NL:KVK, NL:VAT, fallback to email |
NL |
B2G |
Peppol |
NL:OINO |
NL:OINO |
|
US |
B2B |
DBNAlliance |
DUNS, GLN, LEI |
US:EIN, US:SSN |
DUNS, GLN, LEI, US:EIN, US:SSN, fallback to email |
There are a few special-routing-needs countries/networks:
Country | X2Y | Network | Receiver Business Identifiers | Routing | |
---|---|---|---|---|---|
Legal Identifier |
Tax Identifier |
Routing Identifier(s) |
|||
ES |
B2B |
FACeB2B |
ES:VAT |
ES:DIRE |
|
ES |
B2G |
FACe |
ES:VAT |
ES:FACE |
|
FI |
B2B |
Finvoice |
FI:OVT |
FI:VAT |
FI:OPID |
SE |
B2B |
Svefaktura |
SE:ORGNR |
SE:VAT |
SE:OPID (optional) |
IT |
B2B |
SDI |
IT:IVA or IT:CF |
IT:CUUO |
|
IT |
B2G |
SDI |
IT:IVA |
IT:CUUO |
For these, the receiver needs to give the sender their routing identifier or one of their routing identifiers in case the have more than one. Therefore, these connections are setup one-by-one and lack the scalability of exchange networks suchs as Peppol and DBNAlliance.
When agreed between the sender and receiver, it is also possible to use special routing identifiers, even where this is not required. For this purpose a GLN number is often used. For instance:
Country | X2Y | Network | Receiver Business Identifiers | Routing | |
---|---|---|---|---|---|
Legal Identifier |
Tax Identifier |
Advanced Routing Identifier |
|||
DE |
B2B |
Peppol |
DE:VAT |
DE:VAT |
GLN |
NL |
B2B |
Peppol |
NL:KVK |
NL:VAT |
GLN |
In these cases too, the connections are setup one-by-one and cannot benefit from the scalability of exchange networks suchs as Peppol and DBNAlliance. In some rare cases, documents need to make multiple hops via multiple service providers and in that case this makes sense. But we recommend avoiding this unless absolutely necessary.
3.3.8. PDF Stamping
For PDF stamping, include the following markers in the PDF:
These will be replace by the actual data:
3.4. Receiving Documents
3.4.1. Receiving Flows
There are two ways to process incoming documents:
-
You are advertising identifiers for a LegalEntity on an exchange network (Peppol, DBNAlliance, etc) and someone sends a document to one of your LegalEntities. This will immediately trigger the Received Document Webhook.
-
You have received a document through another channel (for instance email) and you would like Storecove to process it. To do this, simply push that document into the
endpoint. This endpoint currently supports RFC822 emails. So when you have received an email for one of you customers that contains a purchase invoice, you can use this endpoint to process it. If the email contains a valid electronic invoice attachment (including those inside PDFs like ZUGFeRD/Factur-X) it will be processed. You will then receive a Received Document Webhook through which you can retrieve the processed purchase invoice in JSON format.
3.4.2. Received Document Webhook
When a new document has been received for you via an Exchange network, we will send a webhook with the following contents:
{
"event_type": "received_document",
"event_group": "invoice",
"event": "received",
"document_guid": "f4624435-7fc4-4fc2-9379-dcb641d593dc",
"processing_notes": [],
"tenant_id": "YourTenantId"
}
If you have POSTed a received document into the ReceivedDocuments endpoint, the webhook will also have a "receive_guid" property:
{
"event_type": "received_document",
"event_group": "invoice",
"event": "received",
"receive_guid": "d9d395f8-771d-4b93-b0a5-11e9a7d7d6f5",
"document_guid": "f4624435-7fc4-4fc2-9379-dcb641d593dc",
"processing_notes": [],
"tenant_id": "YourTenantId"
}
The "receive_guid" is the same guid you received when POSTing the document to the ReceivedDocuments endpoint. You can use this to correlate the webhook with the POSTed document.
The deprecated "received_invoice" looks as follows:
{
"event_type": "received_invoice",
"guid": "f4624435-7fc4-4fc2-9379-dcb641d593dc",
"tenant_id": "YourTenantId"
}
You can then use the "document_guid" to retrieve the document from the following endpoint:
{
"event_type": "received_document",
"event_group": "unknown",
"event": "failed",
"receive_guid": "d9d395f8-771d-4b93-b0a5-11e9a7d7d6f5",
"document_guid": null,
"processing_notes": [
{
"noted_at": "2023-10-18 10:24:08+00:00",
"note": "Processing started"
},
{
"noted_at": "2023-10-18 10:24:08+00:00",
"note": "Invalid data attachment: [TaxTotal][TaxAmount] must equal the sum of the [TaxTotal][TaxSubtotal], but calculated 6.3 != 9999.3"
}
],
"tenant_id": "YourTenantId"
}
Event Type | Event Group | Event | Meaning |
---|---|---|---|
received_document |
invoice |
received |
A new document was received. |
unknown |
failed |
Could not process the document |
3.4.3. Document Formats
The endpoint supports two formats. In particular:
-
JSON
The document that we have received is parsed into a JSON object. This means you don’t need to worry about the format the actual document was exchanged in: the JSON always has the same structure. This makes receiving easy to implement, without having to worry about the format-zoo out there.
-
Original
Although the JSON is easy to process, for compliance reaons you may also want to store the document as it was actually exchanged. That is also possible through this endpoint. Note this is only possible for documents received via an Exchange Network.
3.4.4. JSON Object Invoice
An example JSON object for a purchase invoice with all possible fields is:
{
"guid": "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa",
"legal_entity_id": 9999999,
"system_generated_primary_image": true,
"document_type": "invoice",
"sub_type": "invoice",
"source": "peppol",
"tax_system": "tax_line_percentages",
"invoice_number": "201902088624",
"issue_date": "2019-03-01",
"tax_point_date": "2019-03-01",
"due_date": null,
"document_currency_code": "EUR",
"period_start": "2021-12-01",
"period_end": "2021-12-31",
"note": "The invoice note. If multiple notes were received these will be concatenated.",
"accounting_cost": "accounting cost or accounting cost code",
"attachments": [
{
"document": "<base64 encoded document snip>",
"content_type": "application/pdf",
"primary_image": true
}
],
"sender": {
"party_name": "Demo company",
"legal_name": "Demo company",
"department": null,
"line1": "Address 1",
"line2": null,
"zip": "Zippy",
"city": "Cityname",
"building_number": "2929",
"secondary_number": "8181",
"neighborhood": "حي العارض",
"county": null,
"country": "NL",
"billing_contact": {
"first_name": null,
"last_name": null,
"email": "info@example.com",
"phone": "0123456789"
},
"identifiers": [
{
"superscheme": "iso6523-actorid-upis",
"scheme": "NL:KVK",
"scheme_numeric": "0106",
"identifier": "999999999"
}
]
},
"payment_terms_note": "Note on the payment",
"payment_means_array": [
{
"type": "CreditTransferPaymentMean",
"account": "",
"branche_code": "",
"mandate": "",
"network": ""
}
],
"delivery": {
"actual_date": "2021-12-31",
"party": {
"name": "Receiving party"
},
"location": {
"id": "",
"scheme_id": "",
"department": "",
"line1": "",
"line2": "",
"zip": "",
"city": "",
"building_number": "2929",
"secondary_number": "8181",
"neighborhood": "حي العارض",
"county": "",
"country": ""
}
},
"invoice_lines": [
{
"name": "This invoice line",
"description": "A description of this invoice line",
"period_start": "2021-12-01",
"period_end": "2021-12-31",
"allowance_charges": [
{
"amount": 0.00,
"reason": "extra discount"
}
],
"price": {
"amount": 10.25,
"base_quantity": 1.0
},
"units": {
"quantity": 1.0,
"unit_code": "C62"
},
"amount_excluding_tax": 10.25,
"tax": {
"tax_amount": 0.00,
"percentage": 0.00,
"country": "US",
"category": "standard",
"type": "VAT"
},
"accounting": {
"code": "code",
"name": "code description",
"list": "list of the code",
"list_version": "list_version"
},
"note": "This is a note for this invoice line"
}
],
"allowance_charges": [
{
"amount_excluding_tax": 0.00,
"tax": {
"tax_amount": 0.00,
"percentage": 0.00,
"country": "US",
"category": "standard",
"type": "VAT"
},
"reason": ""
}
],
"document_totals": {
"total": 12.40,
"rounding": 0.00,
"prepaid": 0.00,
"payable": 12.40,
},
"accounting_currency_taxable_amount": 0.00,
"accounting_currency_tax_amount": 0.00,
"accounting_currency_exchange_rate": 1.00,
"tax_subtotals": [
{
"amount_excluding_tax": 0.00,
"tax": {
"tax_amount": 0.00,
"percentage": 0.00,
"country": "US",
"category": "standard",
"type": "VAT"
}
}
]
}
Change Log
The baseline version of the purchase invoice JSON object is 2024-01-01. If you specify a version before that or no version at all, you will get a JSON that includes deprecated features.
The following changes have been made since the baseline version:
2024-01-01
-
Baseline version
2024-03-01
-
add missing attachment.filename property
-
deprecate attachment.content_type in favor of attachment.mime_type
-
wrap company_name, registration_name, address and contact in a party object
-
fix party addresses
-
reference object: include null-valued properties too
-
tax_subtotals objects now conform to documentation (TaxSubtotal)
2024-05-01
-
invoice lines and allowance_charge objects now contain an array of taxes_duties_fees objects, no longer a single tax object.
-
added missing document line note field. This field is also added for all older versions.
2024-06-01
-
invoices now contain
-
accounting_currency_tax_amount
-
accounting_currency_tax_base_amount
-
accounting_currency_exchange_rate
-
3.4.5. JSON Object Order
The baseline version of the received order JSON object is 2024-01-01. If you specify a version before that or no version at all, you will get a JSON that includes deprecated features.
Since version 2024-03-01 the JSON object for a received order is the same as for a sent order, so for a complete example see Order.
The following changes have been made since the baseline version:
2024-01-01
-
Baseline version
2024-03-01
-
add missing attachment.filename property
-
deprecate attachment.content_type in favor of attachment.mime_type
-
wrap company_name, registration_name, address and contact in a party object
-
fix party addresses
-
reference object: include null-valued properties too
-
tax_subtotals objects now conform to documentation (TaxSubtotal)
-
don’t include the sellerSupplierParty since it is represented by the legal_entity_id
-
fix requested_delivery_period to use a '-' not a '=' to separate the start and end dates
-
delivery.shipping_marks is a string, not an array
-
rename order_line.price to order_line.item_price
-
order_line.taxes_duties_fees.percentage is now always a number, not sometimes a string
-
add missing orderline.delivery.delivery_location
4. Various Deprecated
4.1. Reporting
If you use the API then you will receive feedback on the status of documents via webhooks. But if you use legacy connection types such as SFTP or SMTP, that is not possible. For those cases we can setup a daily report via email with the result of all yesterday’s documents sent.
This report contains a column "action required" that you can use to filter only those documents that require action to be taken. The subject of the email will also be prefixed with "OK" or "ACTION REQUIRED" depending on the contents of the report.
This report is often sent directly to the customer service department, where the failed documents can be investigated and fixed. For instance, for first-time revenue, often the email address was not entered correctly. Handling this proactively can save signifact cost downstream in the collections process.
Sending Sales Invoices
For companies wishing to send sales invoices to their Customers through various channels, including the Peppol network (becoming mandatory in the EU for all public entities), our service sends your invoices as e-invoices that can be automatically processed by your Customer’s accountancy software package / ERP.
There are two ways of presenting your sales invoices into the Storecove platform for e-delivery:
-
By emailing your sales invoices to <your_company_name>@send.storecove.com
-
By uploading your sales invoices via SFTP to <your_company_name>@sftp.storecove.com
-
By pushing your sales invoices into our API
We have a web interface where you can view how we processed your invoice and take action on any errors.
If you use our API, the added benefit is that you can configure Webhooks that we will call, updating you with the delivery status of your sales invoice. In addition, you can integrate the delivery status of sales invoices in your customer service environment by requesting their status.
Please see [Individual Companies] for details.
Receiving Purchase Invoices
For receiving invoices there are two solutions that we offer:
-
The Peppol European e-invoicing network
-
<your_company_name>@receive.storecove.com (with optional scan&recognize)
Both will give you not only the PDF invoice, but also the e-invoice, ready for automated processing in your ERP without any manual intervention.
These services can be fully managed via the web interface and no API integration is necessary.
We can deliver purchase invoices to most accountancy software packages, either through their API or by sending the purchase invoice to an email address. It is also possible to leverage our Webhooks, which allow you to configure a URL that we will call each time a purchase invoice is received. You can then retrieve it and process it in your ERP.
Sending Sales Invoices
For companies wishing to send sales invoices to their Customers through various channels, including the Peppol network (becoming mandatory in the EU for all public entities), our service sends your invoices as e-invoices that can be automatically processed by your Customer’s accountancy software package / ERP.
There are two ways of presenting your sales invoices into the Storecove platform for e-delivery:
-
By emailing your sales invoices to <your_company_name>@send.storecove.com
-
By uploading your sales invoices via SFTP to <your_company_name>@sftp.storecove.com
-
By pushing your sales invoices into our API
We have a web interface where you can view how we processed your invoice and take action on any errors.
If you use our API, the added benefit is that you can configure Webhooks that we will call, updating you with the delivery status of your sales invoice. In addition, you can integrate the delivery status of sales invoices in your customer service environment by requesting their status.
Please see [Individual Companies] for details.
Receiving Purchase Invoices
For receiving invoices there are two solutions that we offer:
-
The Peppol European e-invoicing network
-
<your_company_name>@receive.storecove.com (with optional scan&recognize)
Both will give you not only the PDF invoice, but also the e-invoice, ready for automated processing in your ERP without any manual intervention.
These services can be fully managed via the web interface and no API integration is necessary.
We can deliver purchase invoices to most accountancy software packages, either through their API or by sending the purchase invoice to an email address. It is also possible to leverage our Webhooks, which allow you to configure a URL that we will call each time a purchase invoice is received. You can then retrieve it and process it in your ERP.
4.2. Email Ingestion
4.2.1. Introduction
Email ingestion refers to Storecove receiving and processing your (or your Client’s) invoice via an email to <company_name>@send.storecove.com. This email should have an attachment that contains the data that makes up the invoice and optionally an attachment that has an image of the invoice, in PDF format.
4.2.2. From: Address
The address you send from determines your identity as sender of the invoice, and so therefore needs to be validated by Storecove. The entire process is described on
4.2.3. To: Address
If you have followed the previous link, you will have setup an email addresss <company_name>@send.storecove.com. You can send emails to this address with your electronic invoices to send.
4.2.4. Attachments
Data
You need to provide an attachment with the data contained in the invoice.
You can attach a UBL 2.0 or UBL 2.1 invoice. Even if these are not 100% compliant, we can probably process them. Contact us on helpdesk@storecove.com for a test if you are not sure.
If you cannot produce a UBL attachment, we also support other formats (like CII, SAP IDoc, cXML, CSV) and we can also support your custom format. Contact us on helpdesk@storecove.com if you need to use a non-UBL format.
If you have a PDF image of the invoice, you can provide it as an attachment. This attachment’s filename should end in ‘.pdf’. If you do not have a PDF to attach, just leave it out and we will create one for you
4.3. SFTP Ingestion
4.3.1. Introduction
SFTP ingestion refers to Storecove receiving and processing your (or your Client’s) invoices via secure file upload to <company_name>@sftp.storecove.com.
4.3.2. Files
The upload may consist of mulitple files, each with its own purpose. We currently support the following purposes:
-
Data
-
Primary image
-
Additional attachments
The data file contains the data of the invoice. It usually is in UBL format, but if you cannot produce a UBL file, we also support other formats (like CII, SAP Ioc, cXML, CSV) and we can also support your custom format. Contact us if you need to use a non-UBL format. The primary image file should be a PDF. The additional attachments are currently also limited to PDF only, but please contact us if you have different requirements.
The filenames, always in lowecase, have the following structure:
-
<file_id>_<purpose>.<extension> or
-
<file_id>_<purpose>_<participant_identifier>.<extension> or
-
<file_id>_additional_<counter>.<extension> or
-
<file_id>_additional_<counter>_<participant_identifier>.<extension>
All files pertaining to the same invoice should have the same file_id. The file_id should never be re-used. The file_id must be a uuid (any version) and therefore may contain only the following characters:
-
a-f, 0-9 and '-'
and have the following structure:
-
cccccccc-cccc-cccc-cccc-cccccccccccc
Note that if you use a hash of the invoice number as file_id, that may work, but you will not be able to resend that invoice. For that reason, it is recommended to include a random string to make the file_id globally unique.
The purpose must be one of:
-
data (this file contains the invoice data and may occur only once)
-
primary (this is the primary image of the invoice, i.e. a PDF of the invoice. It may occur only once.)
-
additional (this indicates an additional attachment, perhaps an invoice specification. It may occur multiple times)
-
structure (see below)
Examples of valid file names are:
-
82b3785e-0569-482d-a683-ee437eb3df13_data.xml
-
82b3785e-0569-482d-a683-ee437eb3df13_primary.pdf
-
82b3785e-0569-482d-a683-ee437eb3df13_additional_1.pdf
-
82b3785e-0569-482d-a683-ee437eb3df13_primary_nl-oin.00000000000000000000.pdf
-
82b3785e-0569-482d-a683-ee437eb3df13_additional_hr-vat.hr12345678901_1.pdf
-
82b3785e-0569-482d-a683-ee437eb3df13_primary_0190.00000000000000000000.pdf
-
82b3785e-0569-482d-a683-ee437eb3df13_additional_9934.hr12345678901_1.pdf
It is best to provide your participant identifiers in the data file. That way, you can provide as many as you have. If you are not able to include the participant identifiers in the data file, the filename is the next best option. It can, however, hold only a single participant identifier. The full list of participant identifiers can be found here: Receiver Identifiers |
4.3.3. Structure
If you always provide the same set of files (for instance: only a data file or only a data file + a PDF file) then we will configure this statically when we setup your SFTP upload capability. If, however, you wish to have the ability to provide different sets of documents (for instance: sometimes you provide one or more additional attachments, but sometimes you don’t) then it is possible to send us structure of your invoice submission through a separate file, the structure file. It contains a description of which files make up the invoice submission and so we will wait processing the already uploaded files until the set is complete. The contents of the structure file looks like this:
{
"documents": [
{
"purpose": "data",
"extension": "xml",
"count": 1
},
{
"purpose": "primary",
"extension": "pdf",
"count": 1
},
{
"purpose": "additional",
"extension": "pdf",
"count": 2
}
]
}
You have to choose: either you always provide the same set of files, or you always provide a structure file.
4.3.4. Setup
At this moment the setup cannot be done through our web interface. Therefore, please contact us on helpdesk@storecove.com to setup your SFTP upload capability.
4.3.5. Key pair
To setup SFTP, we you need to generate an SSH keypair and send us the public part. On Linux:
ssh-keygen -t rsa -b 4096 -f id_rsa
Leave the passwords empty. Send us the file
-
id_rsa.pub
Don’t send us your id_rsa file, that is to be kept private. |
4.4. Access Point as-a Service
Software suppliers use Storecove as a Peppol Access Point to provide e-invoicing to their customers. For example, if you are an e-commerce SaaS product, Storecove would provide your e-invoicing functionality to many client businesses.
You can use Storecove for your own e-invoicing (as a a company), and for your clients (Access Point as a Service).
4.5. Introduction
Use the API calls
to mange your organizations and their peppol identifiers.
4.6. Sending
For sending, you may want to first "preflight"
to check whether a Peppol identifier can be reached on the Peppol network. Next, send your invoice using
If you send all your invoices through Storecove (i.e. to an email if we cannot send it via Peppol) you do not need to preflight.
4.7. Receiving
Configure the appropriate webhook. See Webhooks.
4.8. Embedded Supplier Connections
4.8.1. Introduction
This API facilitates white label embedding Storecove Script Connections into your own service/product. This enables your users to manage the credentials with which Storecove retrieves invoices from suppliers, directly in your website.
4.8.2. Use
The typical use-case is as follows:
-
You show your user a list of suppliers to choose from.
-
When they click on a supplier, they provide their username/password in a modal form.
-
When they save, you create a ShopAccount via the Storecove API
You should not limit the list of suppliers to only suppliers the user does not yet have connected, since it is possible to have more than one connection to the same supplier (e.g. two mobile phone subscriptions with Vodafone with separate accounts).
The list of available suppliers can be found with this API call:
When a user connects a new supplier, you create a new ShopAccount with the following API call:
When a new invoice is retrieved, you are notified via a webhook (Webhooks).
Invoices will be retrieved from one month before the moment on which the ShopAccount was created.
Authorization failures
If your user provides the wrong credentials, the connection with the supplier cannot be created and invoices are not retrieved. The user needs to take action. A call is available to receive a list of ShopAccounts that have been diagnosed with an authorization problem:
The following are the relevant fields in each ShopAccount: id, external_user_id, sign_in_error_confirmed, sign_in_error_confirmed_at. Poll daily and process the result:
-
If a ShopAccount is on your list, but no longer in the list returned, then either the problem was resolved or it was not resolved for too many days and the ShopAccount has therefore been dropped by Storecove (currently after 30 days). In both cases, remove the id from your list. To determine what happened, request the ShopAccount by its id. You will receive a 200 or a 404.
-
If a ShopAccount is not yet on your list, add it. You can now start the process that you want to follow to alert the user. For instance, you could email them and/or show the problem in your web interface.
-
When someone changes their credentials in your web interface, remove the id from your list immediately after updating the ShopAccount via the API.
5. Best Practices
5.1. Job Queues
The Storecove API is highly available. However, that does not mean 100%.
We therefore recommend that all POSTs to our API are done in a job queue. Jobs can be rescheduled to automatically retry after an (increasing) amount of time and should the job finally fail, you can investigate why and potentially reschedule it manually. Typically, whenever you receive an HTTP response 500-599 (indicating a server-side error) you can retry, when you receive a response 400-499 (indicating a client side error) you need to investigate.
5.2. Production Data
It is highly recommended to use (optionally anonimized) real production data during development. Our experience is that if you make up your own invoice data, you are going to run into error message after error message, making the whole process very frustrating. Invoices are complex objects and using production data ensures your data is consistent and relevant.
5.3. Resilience to Changes
It is our policy to not introduce breaking changes in our API except with a major version upgrade. The last major version upgrade was over five years ago and the next one is not on the cards. That means once you have completed your integration, you do not need to worry about Storecove forcing you into a continouous stream of maintenance changes.
However, we do make backwards compatible changes to our API nearly every day. The following are changes that we consider to be backwards compatible:
-
Adding new API resources
-
Adding new methods for a resource
-
Adding new attributes to existing API responses
-
Changing the order of attributes in existing API responses
-
Adding new input attributes to existing API methods
-
Adding new event types, event groups and events
In order for your code to be resilient to these types of backwards compatible changes, we recommend the following best practices:
-
Ignore response attributes that you don’t recognize You can do this as follows in popular environments:
-
Java (Jackson):
@JsonIgnoreProperties(ignoreUnknown = true)
-
.NET (System.Text.Json .NET Core 3.0+):
var options = new JsonSerializerOptions { IgnoreUnknownJsonFields = true // This option directly tells the serializer to ignore unknown fields }; var myObject = JsonSerializer.Deserialize<MyObjectType>(jsonString, options);
-
.NET (Newtonsoft.Json):
var settings = new JsonSerializerSettings { MissingMemberHandling = MissingMemberHandling.Ignore // Ignore properties during deserialization that are not found in the target type }; var myObject = JsonConvert.DeserializeObject<MyObjectType>(jsonString, settings);
-
-
Ignore event types, event groups and events that you don’t recognize
Also, from time to time, we may introduce enhanced validation rules that prevent illegal scenarios from occurring. This should not lead to problems in your production environment, but in development, if you are not using valid production scenario’s, you may encounter invalid scenario’s being blocked. This is why we recommend using (anonymized) production data for development and test.
6. API Reference
6.1. Resources
6.1.1. AdditionalTaxIdentifiers
Create a new AdditionalTaxIdentifier
POST /legal_entities/{legal_entity_id}/additional_tax_identifiers
Description
Create a new AdditionalTaxIdentifier. An AdditionalTaxIdentifier is a seconday tax identifier that is used inside the EU when sending invoices to consumers. In that case, the VAT of the receiving country is used and if the sender has a local VAT identifier, that is used to identifiy the sender, instead of the sender’s origin country VAT number. To use these identifiers, use the invoice.consumerTaxMode = true property.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
legal_entity_id |
The id of the LegalEntity for which to create the AdditionalTaxIdentifier |
integer (int64) |
Body |
additional_tax_identifier |
AdditionalTaxIdentifier to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Get AdditionalTaxIdentifier
GET /legal_entities/{legal_entity_id}/additional_tax_identifiers/{id}
Description
Get an AdditionalTaxIdentifier
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the AdditionalTaxIdentifier |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the AdditionalTaxIdentifier belongs to |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Delete AdditionalTaxIdentifier
DELETE /legal_entities/{legal_entity_id}/additional_tax_identifiers/{id}
Description
Delete an AdditionalTaxIdentifier
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the AdditionalTaxIdentifier |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the AdditionalTaxIdentifier belongs to |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Update AdditionalTaxIdentifier
PATCH /legal_entities/{legal_entity_id}/additional_tax_identifiers/{id}
Description
Update an AdditionalTaxIdentifier
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the AdditionalTaxIdentifier to be updated |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the AdditionalTaxIdentifier belongs to |
integer (int64) |
Body |
additional_tax_identifier |
AdditionalTaxIdentifier to update |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
6.1.2. Administrations
DEPRECATED. Create a new Administration
POST /legal_entities/{legal_entity_id}/administrations
Description
DEPRECATED. Create a new Administration. An Administration is an email destination for purchase invoices.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
legal_entity_id |
The id of the LegalEntity for which to create the Administration |
integer (int64) |
Body |
administration |
Administration to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
DEPRECATED. Get Administration
GET /legal_entities/{legal_entity_id}/administrations/{id}
Description
DEPRECATED. Get an Administration
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the Administration |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the Administration belongs to |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
DEPRECATED. Delete Administration
DELETE /legal_entities/{legal_entity_id}/administrations/{id}
Description
DEPRECATED. Delete an Administration
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the Administration |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the Administration belongs to |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
DEPRECATED. Update Administration
PATCH /legal_entities/{legal_entity_id}/administrations/{id}
Description
DEPRECATED. Update an Administration
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
The id of the Administration to be updated |
integer (int64) |
Path |
legal_entity_id |
The id of the LegalEntity the Administration belongs to |
integer (int64) |
Body |
administration |
Administration to update |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
6.1.3. C5Activation
Request a new C5 Activation
POST /legal_entities/{legal_entity_id}/identifiers/activate/iras
Description
Request a new C5 Activation. Currently only used for SG:UEN identifiers towards SG IRAS.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
legal_entity_id |
The id of the LegalEntity for which to create the C5ActivationRequest |
integer (int64) |
Body |
c5_activation_request |
The C5ActivationRequest to initiate |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
6.1.4. Discovery
Discover Network Participant Existence
POST /discovery/exists
Description
Discover if a network participant exists.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
discoverable_participant |
The participant to check |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Discover Country Identifiers ** EXPERIMENTAL
GET /discovery/identifiers
Description
Discover the identifiers used in each country, for routing, for legal identification as well as for tax identification purposes. We are currently testing this endpoint with selected Customers. If you would like to participate, please contact us.
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
Discover Network Participant Capabilites
POST /discovery/receives
Description
Discover a network participant and their capabilities.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
discoverable_participant |
The participant to check |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
6.1.5. DocumentSubmissions
Submit a new document.
POST /document_submissions
Description
Submit a document for delivery.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
document_submission |
Document to submit |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Get DocumentSubmission Evidence
GET /document_submissions/{guid}/evidence/{evidence_type}
Description
Get evidence for a DocumentSubmission by GUID with corresponding status
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
evidence_type |
Type of evidence requested |
enum (sending, clearing) |
|
Path |
guid |
DocumentSubmission GUID |
string (uuid) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Consumes
-
application/json
6.1.6. InvoiceSubmissions
DEPRECATED. Submit a new invoice
POST /invoice_submissions
Description
DEPRECATED. Use the new /document_submissions endpoint. Submit an invoice for delivery.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
invoice_submission |
Invoice to submit |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
DEPRECATED. Preflight an invoice recipient
POST /invoice_submissions/preflight
Description
Deprecated. Use the new /discovery endpoint. Check whether Storecove can deliver an invoice for a list of ids.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
invoice_recipient_preflight |
The invoice recipient to preflight |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
DEPRECATED. Get InvoiceSubmission Evidence
GET /invoice_submissions/{guid}/evidence
Description
Deprecated. Use the new /document_submissions/{guid}/evidence endpoint. Get evidence for an InvoiceSubmission by GUID with corresponding status
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
guid |
InvoiceSubmission GUID |
string (uuid) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Consumes
-
application/json
6.1.7. LegalEntities
Create a new LegalEntity
POST /legal_entities
Description
Create a new LegalEntity.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Body |
legal_entity |
LegalEntity to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Get LegalEntity
GET /legal_entities/{id}
Description
Get a specific LegalEntity.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
legal_entity id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Delete LegalEntity
DELETE /legal_entities/{id}
Description
Delete a specific LegalEntity.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
legal_entity id |
integer (int64) |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Update LegalEntity
PATCH /legal_entities/{id}
Description
Update a specific LegalEntity.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
id |
legal_entity id |
integer (int64) |
Body |
legal_entity |
LegalEntity updates |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
6.1.8. PeppolIdentifiers
Create a new PeppolIdentifier
POST /legal_entities/{legal_entity_id}/peppol_identifiers
Description
Create a brand new new PeppolIdentifier. For SG - Singapore, special rules apply.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
legal_entity_id |
The id of the LegalEntity for which to create the PeppolIdentifier |
integer (int64) |
Body |
peppol_identifier |
PeppolIdentifier to create |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Delete PeppolIdentifier
DELETE /legal_entities/{legal_entity_id}/peppol_identifiers/{superscheme}/{scheme}/{identifier}
Description
Delete a PeppolIdentifier.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
identifier |
PEPPOL identifier |
string |
Path |
legal_entity_id |
The id of the LegalEntity this PeppolIdentifier belongs to |
integer (int64) |
Path |
scheme |
PEPPOL identifier scheme id, e.g. "DE:VAT". For a full list see Receiver Identifiers. |
string |
Path |
superscheme |
The superscheme of the identifier. Should always be "iso6523-actorid-upis". |
string |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
6.1.9. PurchaseInvoices
DEPRECATED. Get Purchase invoice data as JSON
GET /purchase_invoices/{guid}
Description
DEPRECATED. Use the /api/v2/received_documents endpoint. Get a specific PurchaseInvoice, in JSON format.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
guid |
The guid of the purchase invoice, from the webhook. |
string (uuid) |
|
Query |
pmv |
DEPRECATED. The PaymentMeans version. The default (and deprecated) version 1.0 will give BankPaymentMean, DirectDebitPaymentMean, CardPaymentMean, NppPaymentMean, SeBankGiroPaymentMean, SePlusGiroPaymentMean, SgCardPaymentMean, SgGiroPaymentMean, SgPaynowPaymentMean. Version 2.0 deprecates BankPaymentMean (now CreditTransferPaymentMean), CardPaymentMean (now CreditCardPaymentMean), NppPaymentMean (now AunzNppPayidPaymentMean), SeBankGiroPaymentMean (now SeBankgiroPaymentMean – note the lower 'g' in 'bankgiro'). It also adds OnlinePaymentServicePaymentMean, StandingAgreementPaymentMean, AunzNppPaytoPaymentMean, AunzBpayPaymentMean, AunzPostbillpayPaymentMean, AunzUriPaymentMean. |
string |
|
Query |
version |
The JSON content version date. The default is '1970-01-01' meaning you get all deprecated elements since nothing was deprecated before that ;). If you do not want deprecated elements, use a later date. Do not use a dynamic date, because that means when we deprecate elements they will disappear from our responses. |
string |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
DEPRECATED. Get Purchase invoice data in a selectable format
GET /purchase_invoices/{guid}/{packaging}
Description
DEPRECATED. Use the /api/v2/received_documents endpoint. Get a specific PurchaseInvoice.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
guid |
purchase invoice guid |
string (uuid) |
|
Path |
packaging |
How to package the purchase invoice. Note that "ubl" is deprecated. |
enum (json, ubl, original) |
|
Query |
pmv |
DEPRECATED. The PaymentMeans version. The default (and deprecated) version 1.0 will give BankPaymentMean, DirectDebitPaymentMean, CardPaymentMean, NppPaymentMean, SeBankGiroPaymentMean, SePlusGiroPaymentMean, SgCardPaymentMean, SgGiroPaymentMean, SgPaynowPaymentMean. Version 2.0 deprecates BankPaymentMean (now CreditTransferPaymentMean), CardPaymentMean (now CreditCardPaymentMean), NppPaymentMean (now AunzNppPayidPaymentMean), SeBankGiroPaymentMean (now SeBankgiroPaymentMean – note the lower 'g' in 'bankgiro'). It also adds OnlinePaymentServicePaymentMean, StandingAgreementPaymentMean, AunzNppPaytoPaymentMean, AunzBpayPaymentMean, AunzPostbillpayPaymentMean, AunzUriPaymentMean. |
string |
|
Query |
version |
The JSON content version date. The default is '1970-01-01' meaning you get all deprecated elements since nothing was deprecated before that ;). If you do not want deprecated elements, use a later date. Do not use a dynamic date, because that means when we deprecate elements they will disappear from our responses. Only used for 'json' packaging, not for 'original'. |
string |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
DEPRECATED. Get Purchase invoice data as JSON with a Base64-encoded UBL string in the specified version
GET /purchase_invoices/{guid}/{packaging}/{package_version}
Description
DEPRECATED. Get a specific PurchaseInvoice in UBL format
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
guid |
purchase invoice guid |
string (uuid) |
|
Path |
package_version |
The version of the package. |
enum (si11, si12, si20, aunz, sg, jp, en16931, original) |
|
Path |
packaging |
How to package the purchase invoice. |
enum (ubl) |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
6.1.10. ReceivedDocuments
Receive a new Document
POST /legal_entities/{legal_entity_id}/received_documents
Description
Let us know about a new Document you have received. It will be parsed and then you will receive the "received_document" webhook. You can use the information in the webhook to retrieve the parsed JSON or the original through a GET request.
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
legal_entity_id |
The id of the LegalEntity for which the document was received. |
integer (int64) |
Body |
received_document |
Received document to process. |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
422 |
Unprocessable Entity |
< ErrorModel > array |
Consumes
-
application/json
Get a new ReceivedDocument
GET /received_documents/{guid}/{format}
Description
Get a new ReceivedDocument that you have been notified for via received_document webhook.
Parameters
Type | Name | Description | Schema | Default |
---|---|---|---|---|
Path |
guid |
The guid of the document that was received. This is the "document_guid" property of the "received_document" webhook. |
string (uuid) |
|
Path |
syntax |
The syntax in which to receive the received document. |
enum (json, original) |
|
Query |
version |
The JSON content version date. The default is '1970-01-01' meaning you get all deprecated elements since nothing was deprecated before that ;). If you do not want deprecated elements, use a later date. Do not use a dynamic date, because that means when we deprecate elements they will disappear from our responses. Only used for 'json' packaging, not for 'original'. Not currently used for invoices, only for orders. |
string |
|
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
Consumes
-
application/json
6.1.11. WebhookInstances
GET a WebhookInstance
GET /webhook_instances/
Description
GET a WebhookInstance from the queue. After processing it successfully, DELETE it and GET the next one. When a 204 is received, the queue is empty and the polling process can sleep for a while.
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Success |
|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
DELETE a WebhookInstance
DELETE /webhook_instances/{guid}
Description
DELETE a specific WebhookInstance
Parameters
Type | Name | Description | Schema |
---|---|---|---|
Path |
guid |
WebhookInstance guid |
string (uuid) |
Responses
HTTP Code | Description | Schema |
---|---|---|
204 |
Success |
No Content |
401 |
Unauthorized |
No Content |
403 |
Forbidden |
No Content |
404 |
Not Found |
No Content |
6.2. Definitions
6.2.1. AccountingCustomerParty
The customer receiving the document.
Name | Description | Schema |
---|---|---|
party |
||
publicIdentifiers |
A list of legal and tax identifiers for this customer. |
< PublicIdentifier > array |
6.2.2. AccountingSupplierParty
The supplier sending the invoice. When you are doing the sending, most data for the AccountingSupplierParty is taken from the LegalEntity in the Storecove database, where your sender identity resides and has been validated. However, we provide a limited number of fields (mainly contact fields) here that you can specify on a document-by-document basis. For receiving, the full party object can be received.
Name | Description | Schema |
---|---|---|
party |
||
publicIdentifiers |
A list of legal and tax identifiers for this supplier. |
< PublicIdentifier > array |
6.2.3. AdditionalItemProperty
An additional property for the item
Name | Description | Schema |
---|---|---|
name |
The name of the property. |
string |
value |
The value of the property. |
string |
6.2.4. AdditionalTaxIdentifier
Name | Description | Schema |
---|---|---|
country |
The ISO3166 country code to use this identifier for in case of consumerTaxMode. |
string |
county |
The county/state inside the country code to use this identifier for in case of consumerTaxMode. |
string |
id |
The Storecove assigned id for the AdditionalTaxIdentifier. |
integer (int64) |
identifier |
The identifier. |
string |
scheme |
The scheme of the identifier. |
string |
superscheme |
The superscheme of the identifier. |
string |
6.2.5. AdditionalTaxIdentifierCreate
Name | Description | Schema |
---|---|---|
country |
The ISO3166 country code to use this identifier for in case of consumerTaxMode. |
string |
county |
The county/state inside the country code to use this identifier for in case of consumerTaxMode. Leave empty to create an additional tax identifier for the entire country. For India, use the two last characters of ISO 3166-2:IN (https://en.wikipedia.org/wiki/States_and_union_territories_of_India). |
string |
identifier |
The identifier. |
string |
scheme |
The scheme of the identifier. |
string |
superscheme |
The superscheme of the identifier. Should always be "iso6523-actorid-upis". |
string |
third_party_password |
The password to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN tax identifier. |
string |
third_party_username |
The username to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN tax identifier. |
string |
6.2.6. AdditionalTaxIdentifierUpdate
Name | Description | Schema |
---|---|---|
identifier |
The identifier. |
string |
third_party_password |
The password to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN tax identifier. |
string |
third_party_username |
The username to use to authenticate to a system through which to send the document, or to obtain tax authority approval to send it. This field is currently relevant only for India and mandatory when creating an IN tax identifier. |
string |
6.2.7. Address
The address
Name | Description | Schema |
---|---|---|
city |
The name of the city. Mandatory in most countries. |
string |
country |
||
county |
An optional county name. |
string |
street1 |
The street name and number. Mandatory in most countries. |
string |
street2 |
The second street field. Use this if you used the first field for the building name. |
string |
zip |
The zipcode/postalzone. Mandatory unless the country does not have zip codes. |
string |
6.2.8. Administration
Name | Description | Schema |
---|---|---|
email |
The email address to send the received document to |
string |
id |
The Storecove assigned id for the Administration. |
integer (int64) |
legal_entity_id |
The LegalEntity the Administration belongs to. |
integer (int64) |
package_version |
The version of the package. |
enum (peppol_bis_v3, aunz, sg) |
packaging |
How to package the purchase invoice. |
enum (ubl) |
sender_email_identity_id |
The id of the SenderEmailIdentity. If not provided, the Storecove default sender will be used |
integer (int64) |
6.2.9. AdministrationCreate
Name | Description | Schema |
---|---|---|
email |
The email address to send the received document to |
string |
legal_entity_id |
The LegalEntity the Administration belongs to. |
integer (int64) |
package_version |
The version of the package. |
enum (peppol_bis_v3, aunz, sg) |
packaging |
How to package the purchase invoice. |
enum (ubl) |
sender_email_identity_id |
The id of the SenderEmailIdentity. If not provided, the Storecove default sender will be used |
integer (int64) |
6.2.10. AdministrationUpdate
Name | Description | Schema |
---|---|---|
email |
The email address to send the received document to |
string |
package_version |
The version of the package. |
enum (peppol_bis_v3, aunz, sg) |
packaging |
How to package the purchase invoice. |
enum (ubl) |
sender_email_identity_id |
The id of the SenderEmailIdentity. If not provided, the Storecove default sender will be used |
integer (int64) |
6.2.11. AllowanceCharge
Name | Description | Schema |
---|---|---|
amountExcludingTax |
The amount for the allowance or charge, excluding tax. |
number |
amountExcludingVat |
DEPRECATED. Use amountExcludingTax. The amount for the allowance or charge, excluding VAT. |
number |
amountIncludingTax |
The amount for the allowance or charge, including tax. |
number |
baseAmountExcludingTax |
The base amount for the allowance or charge, excluding tax. |
number |
baseAmountIncludingTax |
The base amount for the allowance or charge, including tax. |
number |
reason |
The reason for the allowance or charge, free text |
string |
reasonCode |
DEPRECATED. Do not use. Contact Storecove first if you want to use this field. |
string |
tax |
DEPRECATED. Use the taxesDutiesFees array. The tax for this allowance or charge. |
|
taxesDutiesFees |
An array of taxes, duties and fees for this invoice line. At this moment, multiple Tax items is allowed only for IN (India) and US (USA) taxes. All other countries can only have a single Tax item in this array. |
< Tax > array |
6.2.12. Attachment
A document attachment to the invoice.
Name | Description | Schema |
---|---|---|
description |
A description for the file attachment. |
string |
document |
The base64 encoded version of the document attachment. |
string |
documentId |
An id for the file attachment. |
string |
filename |
The name of the file attachment. |
string |
mimeType |
The document attachment mime type. The mime type 'application/xml' can only be used when routing via Peppol to DE:LWID identifier '99661-PEPPOLVERIFIKATION-25' or identifier '991-55555PEPPO-82' |
enum (application/pdf, application/xml) |
primaryImage |
DEPRECATED. Whether or not this document is a visual representation of the invoice data. Note that using value 'true' is discouraged, since the invoice data itself is leading, not the image, and including an image may lead to confusion. Peppol no longer allows including primary images. |
boolean |
6.2.14. C5ActivationRequest
The C5 activation request
Name | Description | Schema |
---|---|---|
client_redirect_fail_url |
The URL to redirect to in case of a C5 authorization fail. |
string |
client_redirect_success_url |
The URL to redirect to in case of a C5 authorization success. |
string |
flow_type |
The flow type. |
enum (flow_redirect) |
identifier |
The identifier. |
string |
scheme |
The scheme. |
enum (SG:UEN) |
simulate |
Whether to simulate the C5 activation. |
boolean |
superscheme |
The superscheme of the identifier. Should always be 'iso6523-actorid-upis'. |
enum (iso6523-actorid-upis) |
6.2.15. Contact
Contact details for the invoice
Name | Description | Schema |
---|---|---|
email |
string (email) |
|
firstName |
string |
|
id |
Only supported for AccountingCustomerParty. |
string |
lastName |
string |
|
phone |
Maximal length : |
string |
6.2.16. CorpPass
Name | Description | Schema |
---|---|---|
client_redirect_fail_url |
The URL the CorpPass system will redirect to in case of a failure to perform identity verfication. |
string |
client_redirect_success_url |
The URL the CorpPass system will redirect to in case of successful identity verfication. |
string |
corppass_url |
The CorpPass redirect URL. |
string |
enabled |
Whether or not the CorpPass flow is enabled. |
boolean |
flow_type |
The CorpPass flow type. |
enum (corppass_flow_redirect, corppass_flow_email, corppass_flow_pdf) |
signer_email |
The email of the person who is going to perform the CorpPass process. |
string |
signer_name |
The name of the person who is going to perform the CorpPass process. |
string |
simulate_corppass |
Whether or not CorpPass is being simulated. |
boolean |
status |
The status of the CorpPass process. |
enum (corppass_no_status,, corppass_initiated,, corppass_cancelled,, corppass_failed,, corppass_succeeded) |
6.2.17. CorpPassCreate
Name | Description | Schema |
---|---|---|
client_redirect_fail_url |
The URL the CorpPass system will redirect to in case of a failure to perform identity verfication. Mandatory for flow_type="corppass_flow_redirect" |
string |
client_redirect_success_url |
The URL the CorpPass system will redirect to in case of successful identity verfication. Mandatory for flow_type="corppass_flow_redirect" |
string |
enabled |
DEPRECATED. Whether or not to enable the CorpPass flow. Must be true if provided. |
boolean |
flow_type |
The CorpPass flow type. Note that using corppass_flow_pdf requires special setup of your account by Storecove. |
enum (corppass_flow_redirect, corppass_flow_email, corppass_flow_pdf) |
kyc_document |
The Base64-encoded PDF document used for KYC. Mandatory for flow_type="corppass_flow_pdf" |
string |
signer_email |
The email of the person who is going to perform the CorpPass process. Mandatory for flow_type="corppass_flow_email" |
string |
signer_name |
The name of the person who is going to perform the CorpPass process. Mandatory for flow_type="corppass_flow_email" |
string |
simulate_corppass |
Whether or not to simulate CorpPass. Instead of redirecting to a CorpPass URL, you will receive a redirect to a Storecove URL which will show a page with two buttons: success and fail. This makes development without having test CorpPass credentials possible. Note this only works in sandbox, not in the production environment. |
boolean |
6.2.18. Country
An ISO 3166-1 alpha-2 country code.
Type : enum (AD, AE, AF, AG, AI, AL, AM, AO, AQ, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BQ, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, SS, ST, SV, SX, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW, XK, XI)
6.2.19. CountrySpecification
Name | Description | Schema |
---|---|---|
country |
The ISO 3166-2 country this specification is for. |
|
receiver |
The receiver of the document. |
|
region |
The region this country belongs to. Within this region exchanging invoices is well defined. Between regions some care needs to be taken and Storecove may help in automatically converting some items. Contact us for details of inter-regional document exchange. |
enum (eu_eea, sg, aunz, in, world) |
sender |
The sender of the document. |
Receiver
Name | Description | Schema |
---|---|---|
business |
The business receiver of the document. |
|
consumer |
The consumer receiver of the document. |
|
government |
The government receiver of the document. |
Business Receiver
Name | Description | Schema |
---|---|---|
legal |
The legal identifier of the business receiver. |
|
routing |
The routing identifier of the business receiver. |
|
tax |
The tax identifier of the business receiver. |
Consumer Receiver
Name | Description | Schema |
---|---|---|
legal |
The legal identifier of the consumer receiver. |
|
routing |
The routing identifier of the consumer receiver. |
|
tax |
The tax identifier of the consumer receiver. |
Government Receiver
Name | Description | Schema |
---|---|---|
legal |
The legal identifier of the government receiver. |
|
routing |
The routing identifier of the government receiver. |
|
tax |
The tax identifier of the government receiver. |
Sender
Name | Description | Schema |
---|---|---|
legal |
The legal identifier of the sender. |
|
tax |
The tax identifier of the sender. |
6.2.20. CountrySpecificationIdentifier
Name | Description | Schema |
---|---|---|
centalized_identifier_test |
The centralized identifier to use for routing in test cases, if the "centralized" proprerty is true. May not always be available depending on the country and network. |
string |
centralized |
Whether or not the identifier represents a centralized routing identifier. This is used in SG, AT and FR where all government invoices are routed to a central accesspoint with a single identifier. This field can only be present for routing identifiers. |
boolean |
centralized_identifier |
The centralized identifier to use for routing, if the "centralized" proprerty is true. |
string |
description |
Identifier description. |
string |
scheme |
The scheme of the identifier |
string |
scheme_numercial |
The numerical version of the scheme of the identifier |
string |
scheme_type |
The scheme type of the identifier. Currently always "iso6523-actorid-upis" |
enum (iso6523-actorid-upis) |
6.2.21. CountrySpecifications
Name | Schema |
---|---|
countries |
< CountrySpecification > array |
6.2.22. CurrencyCode
The ISO 4217 currency code.
Type : enum (AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BOV, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHE, CHF, CHW, CLF, CLP, CNY, COP, COU, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MXV, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STN, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, USN, UYI, UYU, UZS, VEF, VND, VUV, WST, XAF, XAG, XAU, XBA, XBB, XBC, XBD, XCD, XDR, XFU, XOF, XPD, XPF, XPT, XSU, XTS, XUA, XXX, YER, ZAR, ZMW)
6.2.23. Delivery
Name | Description | Schema |
---|---|---|
actualDeliveryDate |
The actual date of the delivery. Used only for Invoice |
string |
deliveryLocation |
||
deliveryParty |
The party to whom the delivery takes place. |
|
deliveryPartyName |
DEPRECATED. Use deliveryParty. The name of the party that took delivery. Used only for Invoice |
string |
quantity |
The quantity of the delivery. Used only for Invoice |
number |
requestedDeliveryPeriod |
The requested delivery period. Used only for DocumentOrder. Will also be used for DocumentOrder order lines, if that order line does not specify its own delivery period. |
string |
shipment |
The shipment for the delivery. |
|
shippingMarks |
DEPRECATED. Use the shipment object. A text that the buyer requests to be printed on the packing labels. Used only for DocumentOrder. |
string |
deliveryLocation
Name | Description | Schema |
---|---|---|
address |
The address of the delivery location. |
|
id |
The location identifier. |
string |
locationName |
The name of the delivery location. Only used for DocumentOrder. |
string |
schemeAgencyId |
DEPRECATED. The schemeAgencyId of the location identifier (e.g. 'ZZZ') |
string |
schemeId |
The schemeId of the location identifier (e.g. 'EAN') |
string |
6.2.24. DeliveryParty
The party receiving the shipment.
Name | Description | Schema |
---|---|---|
party |
||
publicIdentifiers |
A list of legal and tax identifiers for this delivery party. |
< PublicIdentifier > array |
6.2.25. DeliveryTerms
Name | Description | Schema |
---|---|---|
deliveryLocationId |
The location to which the delivery terms refer. |
string |
incoterms |
The incoterms:
|
enum (EXW, FCA, CPT, CIP, DAP, DPU, DDP, FAS, FOB, CFR, CIF) |
specialTerms |
A description of special conditions relating to the delivery terms. |
string |
6.2.26. DiscoverableParticipant
A participant to be discovered.
Name | Description | Schema |
---|---|---|
documentTypes |
An array of document types to discover. The default is '["invoice", "creditnote"]'. This is ignored when only checking existence. |
< enum (invoice, creditnote, invoice_response, order, ordering, order_response) > array |
flags |
The flags for the check. |
|
identifier |
The actual identifier. |
string |
metaScheme |
The meta scheme of the identifier. For Peppol this is always 'iso6523-actorid-upis'. |
string |
network |
The network to check. Currently only 'peppol' is supported. |
string |
scheme |
The scheme of the identifier. See Receiver Identifiers for a list. |
string |
6.2.27. DiscoveredParticipant
A public identifier for this customer.
Name | Description | Schema |
---|---|---|
code |
The response code. |
enum (OK, NOK) |
email |
Whether or not an 'OK' response means the document will be sent via Peppol, but delivered by email. This happens in the Belgian Hermes system where all identifiers have been registered, but if the receiver hasn’t registered with a service provider, the Hermes system will send a PDF created from the electronic invoice and email that. The electronic document will itself not be emailed. Also see Hermes. |
boolean |
6.2.28. DiscoveryFlag
A flag to filter for documents
Name | Description | Schema |
---|---|---|
supportsSelfBilling |
Whether or not to filter for documents that support self billing. |
enum (allowed, required, not_allowed) |
6.2.29. DocumentInvoiceReport
The invoice report to send.
Name | Description | Schema |
---|---|---|
action |
The action to take. |
string |
6.2.30. DocumentInvoiceResponse
The invoice response to send or received.
Name | Description | Schema |
---|---|---|
clarifications |
A list of clarifications why a received invoice was rejected (RE) or under query (UQ) and what action to take. |
< InvoiceResponseClarification > array |
effectiveDate |
The date when the status became effective. Format: yyyy-mm-dd. |
string |
note |
A note to add to the invoice reponse |
string |
responseCode |
The response code. For details see https://docs.peppol.eu/poacc/upgrade-3/codelist/UNCL4343-T111/ |
enum (AB, IP, UQ, CA, RE, AP, PD) |
6.2.31. DocumentOrder
The order to send.
Name | Description | Schema |
---|---|---|
accountingCost |
The buyer’s accounting cost centre for this document. |
string |
allowanceCharges |
An array of allowance charges. |
< AllowanceCharge > array |
amountIncludingTax |
Total amount including Tax. |
number |
attachments |
An array of attachments. You may provide up to 10 attchments, but the total size must not exceed 100MB after Base64 encoding. |
< Attachment > array |
buyerCustomerParty |
The party sending the order. Most data for the BuyerCustomerParty is taken from the Storecove database, where your sender identity resides and has been validated. However, we provide a limited number of fields (mainly contact fields) here that you can specify on a document-by-document basis. |
|
delivery |
The delivery information for the document. |
|
deliveryTerms |
The terms of delivery for the document. |
|
documentCurrencyCode |
The documentCurrencyCode is the currency for the entire invoice. We currently do not support invoices in multiple currencies. If left out, will default to EUR |
|
documentNumber |
The number you assigned to the document. |
string |
issueDate |
Format: yyyy-mm-dd. |
string |
issueTime |
Format: hh:mm:ss |
string |
note |
A note to add to the document |
string |
orderLines |
An array of order lines. |
< OrderLine > array |
orderType |
The type of this order. |
enum (regular, consignment) |
paymentTerms |
The payment terms of the document. |
|
references |
An array of references to other documents. Note that many syntaxes do not support multiple references of the same type in which case they will be concatenated with ','. Also, not all syntaxes and doucments support all documentTypes. |
< Reference > array |
sellerSupplierParty |
The seller supplier party. This info will be added to the LegalEntity provided through the legalEntityId. |
|
taxSystem |
The tax system used for the invoice. The system 'tax_line_percentages' is the only one currently supported. |
enum (tax_line_percentages) |
timeZone |
Format: ±zzzz, where ±zzzz is the difference from UTC, e.g. 0100 or -0900 etc. The timezone will also apply to the document issue date if this field is provided. + **Pattern** : `"^[-]\\d{4}$"` |
string |
validityPeriod |
The period (or specific date) to which the invoice applies. Format: yyyy-mm-dd - yyyy-mm-dd. |
string |
6.2.32. DocumentSubmission
The document you want Storecove to send, with some meta-data.
Name | Description | Schema |
---|---|---|
attachments |
DEPRECATED. Use the attachments array inside the 'document' property. An array of attachments. You may provide up to 10 attchments, but the total size must not exceed 100MB after Base64 encoding. |
< Attachment > array |
createPrimaryImage |
DEPRECATED. In the future we will no longer support creating PDF invoices. Whether or not to create a primary image (PDF) if one is not provided. For customers who started from April 1st 2023, the default is false. For customers who started before that, the default is true. |
boolean |
document |
||
idempotencyGuid |
A guid that you generated for this DocumentSubmission to achieve idempotency. If you submit multiple documents with the same idempotencyGuid, only the first one will be processed and any subsequent ones will trigger an HTTP 422 Unprocessable Entity response. |
string |
legalEntityId |
The id of the LegalEntity this document should be sent on behalf of. Either legalEntityId or receiveGuid is mandatory. |
integer |
receiveGuid |
The GUID that was in the received_document webhook. Either legalEntityId or receiveGuid is mandatory. This field is used for sending response documents, such as InvoiceReponse and OrderResponse. |
string |
routing |
Specifies where the document is to be sent. Can be electronic identifiers or email addresses. |
6.2.33. DocumentSubmissionEvidence
Name | Description | Schema |
---|---|---|
documents |
An array of documents that were sent. For OpenPeppol, this is always a single document (it may contain a PDF inside). For Email, the number of documents depends on the number of attachments, which in turn depends on the country of the receiver. For email, the raw email in RFC822 format is also included. |
< DocumentSubmissionEvidenceDocument > array |
evidence |
The evidence for this transmission. |
|
guid |
The guid for the InvoiceSubmission. |
string |
network |
The network that was used to clear or send the document |
enum (storecove, as2, email, peppol, dbnalliance, sdi, in-irp, pt-b2b, ch-qrbill, finvoice, pl-ksef, spain-face, spain-faceb2b, my-lhdnm) |
receiver |
The legal identifier of the receiver, or the tax identifier if there is no legal identifier. |
string |
sender |
The legal identifier of the sender, or the tax identifier if there is no legal identifier. |
string |
6.2.34. DocumentSubmissionEvidenceDocument
Name | Description | Schema |
---|---|---|
document |
The URL where the document can be retrieved. |
string |
expires_at |
The datetime the URL expires. Format: 'YYYY-MM-DD HH:mm:ss.' |
string |
mime_type |
The mime type of the document. |
enum (message/rfc822, application/xml, application/json, application/pdf, application/pkcs7-mime) |
6.2.35. DocumentSubmissionEvidenceEvidence
Name | Description | Schema |
---|---|---|
acknowledgement_id |
Only used for network IRAS. |
string |
correlation_id |
Only used for network IRAS. |
string |
long_id |
Only used for network my-lhdnm. |
string |
message_id |
The meaning of this field varies, depending on the network. For peppol and dbnaliance, this is the message id of the envelope. For sdi, this is the filename assigned to the document. |
string |
partner_key |
The meaning of this field varies, depending on the network. For my-lhdnm, it is the UUID. |
string |
qr_code |
The QR Code assiged by the tax authority or its authorized partner. Used for networks india and pt-b2b. |
string |
receiving_accesspoint |
An identification of the OpenPeppol accesspoint that the invoice was sent to. Only used for exchange networks like peppol and dbnalliance. |
string |
remote_mta_ip |
The IP address of the sending SMTP server. Only used for network "email". |
string |
reporting_mta |
An identification for the sending SMTP. Only used for network "email". |
string |
signature |
The signature assiged by the tax authority or its authorized partner. Used for network india. |
string |
signature_date_time |
The datetime of the signature assiged by the tax authority or its authorized partner. Used for network india. |
string |
signature_number |
The sequence number of the signature assiged by the tax authority or its authorized partner. Used for network india. |
string |
smtp_response |
The response of the receiving SMTP server. Only used for network "email". |
string |
timestamp |
The timestamp of the delivery to the receiving SMTP server. Only used for network "email". |
string |
transmission_id |
The unique id for this transmission. The meaning of this field varies, depending on the network. |
string |
xml |
The XML evidence for the transmission. This is the XML returned by the receiving accesspoint, either OpenPeppol or DBNAlliance. |
string |
6.2.36. DocumentSubmissionResult
The result of a document submission
Name | Description | Schema |
---|---|---|
guid |
A (V4) GUID for the document submission |
string |
6.2.37. EIdentifiers
A list of electronic routing identifiers. These are the identifiers used on the Peppol network or for other destinations.
Type : < RoutingIdentifier > array
6.2.38. ErrorModel
Name | Schema |
---|---|
details |
string |
source |
string |
6.2.39. Invoice
The invoice to send. Provide either invoice, or invoiceData, but not both.
Name | Description | Schema |
---|---|---|
accountingCost |
The buyer’s accounting cost centre for this invoice, expressed as text. |
string |
accountingCurrencyExchangeRate |
Rate at which the document currency must be multiplied to convert it into the accounting currency. If included, must be non-zero. |
number |
accountingCurrencyTaxAmount |
The total amount of tax in the accounting currency. If included, must be non-zero. |
number |
accountingCurrencyTaxAmountCurrency |
The currency of the accountingCurrencyTaxAmount. This MUST be different from the documentCurrencyCode, since it makes no sence including this othterwise. Mandatory if accountingCurrencyTaxAmount is provided. |
|
accountingCurrencyTaxableAmount |
The taxable amount in the accounting currency. If included, must be non-zero. |
number |
accountingCustomerParty |
The party the invoice is sent to. |
|
accountingSupplierParty |
The party sending the invoice. When you are sending, most data for the AccountingSupplierParty is taken from the LegalEntity in the Storecove database, where your sender identity resides and has been validated. However, we provide a limited number of fields (mainly contact fields) here that you can specify on a document-by-document basis. For receiving, the full party object can be received. |
|
allowanceCharges |
An array of allowance charges. |
< AllowanceCharge > array |
amountIncludingTax |
EXPERIMENTAL for sending. The amountIncludingTax is the payable amount, but not corrected for the prepaid amount. |
number |
amountIncludingVat |
The amountIncludingVat is payable amount, but not corrected for the prepaid amount. We encourage you to use the amountIncludingTax for sending. For receiving, always use amountIncludingTax. |
number |
attachments |
An array of attachments. You may provide up to 10 attchments, but the total size must not exceed 100MB after Base64 encoding. |
< Attachment > array |
billingReference |
DEPRECATED. Use a reference object with a documentType 'billing'. A reference to a commercial invoice or corrective invoice of which the current invoice is a correction. This field is mandatory when sending invoiceType 384. |
string |
buyerReference |
DEPRECATED. Use a reference object with a documentType 'buyer_reference'. A reference provided by the buyer used for internal routing of the document. |
string |
consumerTaxMode |
Whether or not to process the invoice in consumer tax mode. In this mode, the VAT identifier of the sender will not be the default VAT identifier, but the one that matches with the country of the receiving consumer, if that additional VAT identifier for that country is available. These additional VAT identifiers need to be added to the sending LegalEntity by Storecove, so if you need to send invoices in this mode, please contact us. Not used for receiving. |
boolean |
contractDocumentReference |
DEPRECATED. Use a reference object with a documentType 'contract'. A reference to a contract or framework agreement that this invoice relates to. |
string |
delivery |
The delivery of the invoice. |
|
deliveryTerms |
The terms of delivery for the document. This is currently only used for MY LHDNM. |
|
documentCurrencyCode |
The documentCurrencyCode is the currency for the entire invoice. We currently do not support invoices in multiple currencies. If left out, will default to EUR |
|
dueDate |
Format: yyyy-mm-dd. |
string |
invoiceLines |
An array of invoice lines. |
< InvoiceLine > array |
invoiceNumber |
The invoice number you assigned to the invoice. The invoiceNumber should be unique for the legalEntityId and year of the issueDate. This means invoice numbers can be reused in different years, as is customary in some countries. |
string |
invoicePeriod |
The period (or specific date) to which the invoice applies. Format: yyyy-mm-dd - yyyy-mm-dd. |
string |
invoiceType |
DEPRECATED. Do not use. This field is available for legacy reasons only. If you want to send a regular invoice (aka UBL type '380'), make sure you have a positive invoice amount. For a credit note (aka UBL type '381'), simply provide a negative invoice amount. If you, in addition to a negative invoice amount, also specify a billingReferences, your invoice will become a corrective invoice (aka UBL type '384'). If your invoice is not sent in the UBL syntax, Storecove will provide the appropriate type for the syntax the invoice is sent in. |
enum (380, 381, 383, 384, 389) |
issueDate |
Format: yyyy-mm-dd. |
string |
issueReasons |
An array reasons for issuing the invoice. |
< string > array |
issueTime |
Format: hh:mm:ss |
string |
note |
A note to add to the invoice |
string |
orderReference |
DEPRECATED. Use a reference object with a documentType 'purchase_order'. A reference to an order for this invoice, assigned by the buyer. Note that this often is a key field, since many receivers of invoices will use this field to automatically match the invoice to an order they placed. Many receivers refuse invoices that cannot be automatically matched, in particular government agencies. So it is highly recommended to fill this field whenever possible. |
string |
payableRoundingAmount |
The rounding amount for the payable amount. This amount is calulated automatically from the invoiceLines, allowanceCharges and the taxSubtotals. If you provide this field, it must be exactly what we would have calculated. We recommend not using this field for sending. For receiving, it is always present. |
number |
paymentMeansArray |
An array of payment means (ways to pay the invoice). |
< PaymentMeans > array |
paymentMeansBic |
DEPRECATED. Use paymentMeansArray. The BIC (Swift) of the bank where the amount payable should be transferred to |
string |
paymentMeansCode |
DEPRECATED. Use paymentMeansArray. How the invoice has been / will be paid. Use only online_payment_service (payment will be made or has been made by an online payment service), bank_card (e.g. debit card, credit card), direct_debit (the amount has been / will be taken out of the client’s bank account), standing_agreement (an unspecified payment means known to both buyer and seller) or credit_transfer (the buyer will do / has done a bank transfer). The numeric codes are for legacy purposes, they should not be used. |
enum (online_payment_service, bank_card, direct_debit, standing_agreement, credit_transfer, se_bankgiro, se_plusgiro, aunz_npp, , 1, 30, 31, 42, 48, 49, 57, 58) |
paymentMeansIban |
DEPRECATED. Use paymentMeansArray. The IBAN the amount payable should be transferred to |
string |
paymentMeansPaymentId |
DEPRECATED. Use the paymentId in the individual PaymentMeans object. The payment id that you will use to match the payment against the invoice. |
string |
paymentTerms |
The payment terms of the invoice. |
|
preferredInvoiceType |
In autodetect mode, the choice is made by Storecove based on what is appropriate for the receiver and the receiver country, in combination with the invoice amount sign. If you wish to state a preference, use this field. It is not guaranteed that the preference will be used, since it depends also on the receiver’s document capabilities. Only used for sending, not for receiving. For Peppol, only invoice and creditnote are supported. For LHDNM, also debitnote and refundnote are supported. Anything starting it_td* can only be used for SDI. Only used for sending, not present for receiving. |
enum (prefer_autodetect, prefer_invoice, prefer_creditnote, prefer_debitnote, prefer_refundnote, prefer_corrected_invoice, prefer_it_td02, prefer_it_td19, prefer_it_td24) |
prepaidAmount |
The amount already paid. The amountInclucingTax - prepaidAmount is the amount remaining to be paid. |
number |
priceMode |
The price mode. This is used to determine whether the prices are net or gross. Price Mode 'price_mode_gross' can only be used for sender countries ES, IT and PT, "clearWithoutSending": true and "taxSystem": "tax_line_percentages". Only used for sending, not present for receiving. |
enum (price_mode_net, price_mode_gross) |
projectReference |
DEPRECATED. Information about the project this invoice relates to. |
string |
references |
An array of references to other documents. Note that many syntaxes do not support multiple references of the same type in which case they will be concatenated with ','. Also, not all syntaxes support all documentTypes. |
< Reference > array |
salesOrderId |
DEPRECATED. Use a reference object with a documentType 'sales_order'. A reference to an order for this invoice, assigned by the seller. |
string |
selfBillingMode |
There are two reasons for using self billing mode:
When sending in this mode the buyer ("AccountingCustomerParty") and the seller ("AccountingSupplierParty") are automatically switched. That means you still provide the same legalEntityId for the sender (who is now the buyer) and the accountingCustomerParty object is still the receiver (but it is now th |