- Aanleveren Portaal maakt gebruik van de Oauth2 in combinatie met eHerkenning of PKIoverheid-certificaat (Mutual TLS) voor autorisatie. Softwareleveranciers kunnen via deze koppeling aan Aanleveren Portaal gebruikers toestemming vragen om namens hen te handelen. Zo kan je eenvoudig en veilig data delen met de uitvragende partij: authenticatie Aanleveren Portaal
De gekozen authenticatiemethode bepaalt ook de endpoints die gebruikt moeten worden! - Onderaan deze pagina vind je een voorbeeld Postman-collectie (.json) met daarin de API-calls die ondersteund worden door Aanleveren Portaal.
- De Swagger definitie van de Aanleveren Portaal API is hier te vinden.
| Omgeving | Endpoints: Authenticatie via OAuth2 | Endpoints: Authenticatie via PKIo |
| Test | https://test-aanleverenapi.sbrnexus.nl | https://test-aanleverenapi-pki.sbrnexus.nl |
| Acceptatie | https://acc-aanleverenapi.sbrnexus.nl | https://acc-aanleverenapi-pki.sbrnexus.nl |
| Productie | https://aanleverenapi.sbrnexus.nl | https://aanleverenapi-pki.sbrnexus.nl |
Een rapportage versturen naar de bank (via de BIV)
Het versturen van een rapportage naar de BIV, via Aanleveren Portaal, bestaat uit drie stappen/calls:
- Het XBRL-bestand uploaden (maximaal 130 MB)
- Bijlagen uploaden (maximaal 130 MB per bijlage met een maximum van 150 MB in totaal, incl. XBRL)
- De rapportage aanleveren aan de BIV
Belangrijk: de limieten gelden voor de Base64-gecodeerde data die in de request wordt verstuurd. Controleer daarom vóór het uploaden de grootte van het oorspronkelijke bestand.
Een bestand wordt na Base64-encoding ongeveer 30% groter en overschrijdt daarmee de limiet van 130 MB.
Het oorspronkelijke bestand moet dus kleiner zijn!
Het XBRL-bestand uploaden
Voor het uploaden van het XBRL-bestand doen we met een HTTP multipart POST .
| Request |
|
curl -i -X POST \ - H "x-api-key: $token" \ - H "Content-Type: multipart/form-data" \ - F "file=@valid.xbrl" \ |
Let op: het endpoint is verschillend voor de andere authenticatiemethode obv PKIo : https://acc-aanleverenapi-pki.sbrnexus.nl/api/reports
| Response |
|
{ "guid": "AMX5LQjUSyGhlFdIe71f-g", "filename": "valid.xbrl", "checksum": "14293581bf91d848a811708e7e120a9b87c389595e9752ded054fdc0c9b924e4", "cocNumber": 12345678, "cocOrganizationName": null, "entryPoint": { "guid": "XSCXnm5nShutabIKHbcaPQ", "uri": "https://www.sbrnexus.nl/ft15/frc/20201211/entrypoints/frc-rpt-nt-inrichtingsjaarrekening-2020.xsd", "name": "FT15 nt-inrichtingsjaarrekening-2020" }, "sizeInBytes": 184831, "version": 0 } |
Als resultaat krijgen we het aangemaakte report terug. Hierin staat het schemareferentie (entryPoint) van het bestand en het KVK-nummer (cocNumber) als deze automatisch gevonden kon worden. Bij het aanleveren kan naar deze rapportage verwezen worden door de guid uit het resultaat te gebruiken.
Bijlagen uploaden
Voor sommige berichtsoorten is het mogelijk of noodzakelijk om bijlagen mee te sturen als onderdeel van de aanlevering. Om te bepalen welke types en aantallen zijn toegestaan moeten de berichtsoorten worden opgehaald (zie "Rapportage aanleveren bij de BIV").
Net als voor de rapportage, gebruiken we voor het uploaden een HTTP multipart POST .
| Request |
|
curl -i -X POST \ -H "x-api-key: $token" \ -H "Content-Type: multipart/form-data" \ -F "file=@attachment.xbrl" \ |
| Response |
|
{ "guid": "--K3tyNmQ2mqEWZTWMMhiQ", "filename": "attachment.xbrl", "mimeType": "application/xml", "checksum": "14293581bf91d848a811708e7e120a9b87c389595e9752ded054fdc0c9b924e4", "version": 0, "sizeInBytes": 184831 } |
Bij het aanleveren kan naar deze bijlage verwezen worden door de guid uit het resultaat te gebruiken.
Rapportage aanleveren bij de BIV
Aanleveren Portaal gebruikt het berichtsoorten, message types, om aan te geven welk rapportage type naar welke ontvangende partij wordt verstuurd. Berichtsoorten zijn rapportage types en zijn gekoppeld aan toegestane schemareferenties (allowedEntryPoints), ontvangende partijen (allowedReceivers). Hierdoor kun je niet per ongeluk een rapportage type aanleveren bij een ontvangende partij die deze niet ondersteunt. Ook heeft elke berichtsoort een maximum aantal bijlages dat bij een aanlevering mag worden meegestuurd (maximumNumberOfAttachments), en zijn er restricties op de toegestane types en aantallen (all owedAttachments).
De beschikbare berichtsoorten halen we op met een GET.
| Request |
| curl -i -H "x-api-key: $token" https://acc-aanleverenapi.sbrnexus.nl/api/message-types |
| Response |
|
[ { "guid": "fSXzCi52QrSWiwJv4DH7wg", "name": "Jaarrekening", "description": "Jaarrekening met OIN routering", "maximumNumberOfAttachments": 4, "allowedReceivers": [ { "receiver": { "guid": "AwvHWCDjQ3WmD7KCqRiZjA", "name": "Test Bank", "identityNumber": "00000000123456780000" }, "active": true }, (...) ], "allowedEntryPoints": [ { "entryPoint": { "guid": "XSCXnm5nShutabIKHbcaPQ", "uri": "https://www.sbrnexus.nl/ft15/frc/20201211/entrypoints/frc-rpt-nt-inrichtingsjaarrekening-2020.xsd", "name": "FT15 nt-inrichtingsjaarrekening-2020" }, "active": true }, (...) ], "allowedAttachments": [ { "dataType": "XBRL", "minimumNumberOfAttachments": 0, "maximumNumberOfAttachments": 4, "active": true }, (...) ], "active": true }, (...) ] |
Het resultaat bevat veel message types. Deze lijst zal maximaal één keer per dag geupdate worden en kan voor die periode gecached worden.
Nu kunnen we het bericht versturen. Dit doen we door een aanlevering, filing, aan te maken met een POST. Geef hierbij het aanleverkenmerk mee via filing Reference.
| Request |
|
curl -i -X POST -H "x-api-key: $token" -H "Content-Type: application/json" -d '{ "report": { "guid": "AMX5LQjUSyGhlFdIe71f-g" }, "attachments": [ { "guid": "--K3tyNmQ2mqEWZTWMMhiQ" } ], "filingReference": "Test aanlevering", "messageTypeGuid": "fSXzCi52QrSWiwJv4DH7wg", "receiver": { "guid": "AwvHWCDjQ3WmD7KCqRiZjA" } }' https://acc-aanleverenapi.sbrnexus.nl/api/filings |
| Response |
|
{ "guid": "mMeaU7cJR5C0LM8E80ZVKA", "report": { "guid": "AMX5LQjUSyGhlFdIe71f-g", "filename": "valid.xbrl", "checksum": "14293581bf91d848a811708e7e120a9b87c389595e9752ded054fdc0c9b924e4", "cocNumber": "30267975", "cocOrganizationName": null, "entryPoint": { "guid": "XSCXnm5nShutabIKHbcaPQ", "uri": "https://www.sbrnexus.nl/ft15/frc/20201211/entrypoints/frc-rpt-nt-inrichtingsjaarrekening-2020.xsd", "name": "FT15 nt-inrichtingsjaarrekening-2020" }, "sizeInBytes": 184831, "version": 1 }, "attachments": [ { "guid": "--K3tyNmQ2mqEWZTWMMhiQ", "filename": "attachment.xbrl", "mimeType": "application/xml", "checksum": "14293581bf91d848a811708e7e120a9b87c389595e9752ded054fdc0c9b924e4", "version": 0, "sizeInBytes": 184831 } ], "filingReference": "Test aanlevering", "receiver": { "guid": "AwvHWCDjQ3WmD7KCqRiZjA", "name": "Test Bank", "identityNumber": "00000000123456780000" }, "messageTypeGuid": "fSXzCi52QrSWiwJv4DH7wg", "createdBy": { "guid": "UZtTj1cATj6paTFfh0y1OQ", "organization": { "guid": "hX2SxdOaQpuFgbfPe9CLtg", "name": "Financiële Rapportages Coöperatief B.A.", "cocNumber": "34375187", "receiverGuid": null }, "firstName": "Test", "familyName": "Gebruiker", "email": "test.gebruiker@example.com", "termsAndConditionsAccepted": true, "receiveUpdates": false, "version": 0 }, "sentAt": "2021-02-24T09:24:29.107428Z", "externalReference": "BTA-210224-0000003", "bivFiledAt": "2021-02-24T10:24:28.986+01:00", "statusCode": "100", "statusType": "PENDING", "errorCode": null, "errorDescription": null, "version": 0 } |
Het veld externalReference bevat het aanleverkenmerk van de BIV en statusType geeft aan of de aanlevering succesvol is verwerkt. De velden errorCode en errorDescription worden gevuld als de BIV de aanlevering niet succesvol kan verwerken.
De aanlevering zal initieel de status PENDING terugkrijgen. Met onderstaande call kun je de actuele status ophalen. Het antwoord zal overeenkomen met het vorige antwoord.
| curl -i -H "x-api-key: $token" https://acc-aanleverenapi.sbrnexus.nl/api/filings/mMeaU7cJR5C0LM8E80ZVKA |
Hieronder vind je een voorbeeld Postman-collectie (.json) met daarin de API-calls die ondersteund worden door Aanleveren Portaal:
Statussen
Status Code |
Category |
Description |
Explanation |
Status Type |
||
|---|---|---|---|---|---|---|
95 |
Digital Signature |
Submitted for signing |
The signing request has been created and sent to the signatory. |
Pending |
||
96 |
Digital Signature |
Signing completed successfully |
The document has been successfully signed, and the filing continues through the regular processing flow. |
Pending |
||
97 |
Digital Signature |
Signing rejected |
The signatory has rejected the signing request. |
Fault |
||
98 |
Digital Signature |
Signing expired |
The signing request was not completed within the required timeframe and has expired. |
Fault |
||
99 |
Digital Signature |
Signing error |
PKISigning was unable to process the signing request, for example, due to an invalid submission. |
Fault |
||
100 |
BIV |
Successful delivery to BIV |
The submission has been successfully delivered to BIV. |
Pending |
||
105 |
BIV |
Started delivery process |
The delivery process has started. |
Pending |
||
106 |
BIV |
Failure checking delivery |
An error occurred while checking the submission. |
Fault |
||
110 |
BIV |
Started processing delivery |
Processing of the submission has started. |
Pending |
||
200 |
BIV |
Authentication [sender] successful |
Authentication of the sender was successful. |
Pending |
||
210 |
BIV |
Authentication [sender] failed |
Authentication of the sender failed. |
Fault |
||
230 |
BIV |
Technical issue during AuSP check |
A technical error occurred during the Autorisatie Service Provider (AuSP) verification. |
Fault |
||
300 |
BIV |
Validation [content] successful |
The content of the message was successfully validated. |
Pending |
||
302 |
BIV |
Validation [attachment] successful |
The attachment was successfully validated. |
Pending |
||
310 |
BIV |
Validation [content] failed |
Validation of the message content failed. |
Fault |
||
312 |
BIV |
Validation [attachment] failed |
Validation of the attachment failed. |
Fault |
||
320 |
BIV |
Technical issue during validation of content |
A technical error occurred while validating the message content. |
Fault |
||
322 |
BIV |
Technical issue during validation of attachment |
A technical error occurred while validating the attachment. |
Fault |
||
400 |
BIV |
Message received by receiving party |
The message has been received by the receiving party. |
Success |
||
405 |
BIV |
Message delivery in progress |
Delivery of the message to the receiving party is in progress. |
Pending |
||
410 |
BIV |
Message not received by receiving party |
The message was not received by the receiving party. |
Fault |
||
420 |
BIV |
Technical issue during fetching message from bank |
A technical error occurred while retrieving the message from the bank. |
Fault |
||
600 |
BIV |
Virus scan successful |
The virus scan was completed successfully. |
Success |
||
610 |
BIV |
Virus scan failed (virus detected) |
A virus was detected during the virus scan. |
Fault |
||
620 |
BIV |
Technical issue during virus scan |
A technical error occurred during the virus scan. |
|||
2100 |
BIV |
|
|
|||