Source document: https://docs-lawep.s3.us-east-2.amazonaws.com/1694261648830.pdf (Liberia)
Dataportal API Documentation Contents Overview ......................................................................................................................................... 2 Using the API .............................................................................................................................. 2 Methods........................................................................................................................................... 3 Authenticate (POST: dataportal/authenticate) ............................................................................ 3 URL......................................................................................................................................... 3 Request .................................................................................................................................... 3 Response ................................................................................................................................. 4 Logout(POST: dataportal/logout) ............................................................................................... 5 URL......................................................................................................................................... 5 Response ................................................................................................................................. 5 Templates (GET: dataportal/templates) ...................................................................................... 6 URL......................................................................................................................................... 6 Request .................................................................................................................................... 6 Response ................................................................................................................................. 6 Data (POST: dataportal/data) ...................................................................................................... 8 URL......................................................................................................................................... 8 Request .................................................................................................................................... 8 Response ................................................................................................................................. 9 DeliveredReports(GET: dataportal/deliveredReports) ............................................................. 10 URL....................................................................................................................................... 10 Request .................................................................................................................................. 10 Response ............................................................................................................................... 10 AccountingDates(GET: dataportal/accountingDates) .............................................................. 12 URL....................................................................................................................................... 12 Request .................................................................................................................................. 12 Response ............................................................................................................................... 12 1 Overview The Dataportal Rest API enables users to send data into the system Gagnaskilakerfi (GSK) Seðlabanka Íslands.
Using the API Initially users have to login using the authenticate method of the API to obtain authentication token.

This Bearer token returned from API is then used in the HTTP Header for other protected resources of the API.

Token expires 8 hours after authentication.
Here you can try out and play with the API using Swagger:  PROD environment https://api.sedlabanki.is/dataportal/swagger/index.html  TEST environment https://api-test.sedlabanki.is/dataportal/swagger/index.html Base URL´s for Dataportal API Environment URL Test Prod https://api- test.sedlabanki.is/dataportal https://api.sedlabanki.is/dataportal 2 Methods Authenticate (POST: dataportal/authenticate) Used to authenticate the user with the system and obtain the authentication token.
Token also returned in http only cookie.

URL POST https://api.sedlabanki.is/dataportal/authenticate Request Parameters Type Description Data type Type Required username password ssn Username of the user logging in Password of the user logging in Social security number of the report party string body string body string body    JSON request example { "username": "username", "password": "password", "ssn": "ssn", } 3 Response HTTP status codes  200.

OK  400.

Bad Request  401.

Unauthorized  403.


Forbidden  404.

Not found  429.

Too many requests  500.

Internal Server Error HTTP: 200.

OK Name id User id Description Data type username Username of the reporting party token Authentication token ssn Social security number of the reporting party email email of the reporting party List of reporting party members.
partyList int string string string string object PartyName, PartySSN and boolean value indicating if user is admin or not JSON example response { "id": "1234567890", "username": "Jon_Jonsson", "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ey...............", "ssn": "1234567890", "email": "jonjonsson@fyrirtaeki.is" "partyList": [{"partyName": "Banki", "partySsn": "1234567890", "isAdmin": true}] } 4 Logout(POST: dataportal/logout) Used remove http only cookie that includes authentication token URL POST https://api.sedlabanki.is/dataportal/logout Response HTTP status codes  200.
OK  400.

Bad Request  401.

Unauthorized  403.

Forbidden  429.

Too many requests  500.

Internal Server Error HTTP: 200.

OK Name Description Data type statusCode Return code statusMessage Return message int string JSON example response { "statusCode": "200", "statusMessage": "Logout successful", } 5 Templates (GET: dataportal/templates) Used to get templates for user.
URL GET https://api.sedlabanki.is/dataportal/templates Request Parameters Name Description Data type Type Required   token Authentication token string header string parameter ssn Social security number (kennitala) of the reporting party Request example GET https://api.sedlabanki.is/dataportal/templates?ssn=1234567890 Response HTTP status codes  200.

OK  400.

Bad Request  401.

Unauthorized  403.

Forbidden  404.

Not found  429.

Too many requests  500.

Internal Server Error 6 HTTP: 200.


OK Name Description Data type templateId Template Id reportName Name of the report nextDeliveryDate Next due date lastDeliveryDate Last due date ssn useCategoryName useAccountingDate Social security number (kennitala) of the reporting party Indicates whether a department needs to be specified when submitting data.

If true categoryName can be access by calling /accountingDates.

Indicates whether a accounting date needs to be specified when submitting data.
If true accountingDate date can be accessed by calling /accountingDates.

reportType Report data type of the report.

(e.g.

application/vnd.ms-excel) reportExtension Report data type extension (e.g.
xlsx) string string Date Date string bool bool string string catagoryNameList List of departments/branch names to submit the report List<string> JSON example response { "templateId": "S14", "reportName": "EfnahagurTryggingafélaga", "nextDeliveryDate": "2020-04-29T00:00:00", "lastDeliveryDate": "2020-02-14T23:59:59", "ssn": "5602694129", "useCatagoryName": true, "useAccountingDate": true, "reportType": "Excel skrá með macro", "reportExtension": "xlsm", "catagoryNameList": [ "catagory1" , "catagory2" ], } 7 Data (POST: dataportal/data) Used to sent data (reports) into the system.
URL POST https://api.sedlabanki.is/dataportal/data Request Parameters Type Description token templateId ssn Authentication token Template ID.

Retrieved from /templates method Social security number (kennitala) of the reporting party Data type Type string header string body string body    Required accountingDate Accounting date DateTime body string body categoryName file Name of branch / fund / department The data sent into the system Required if useAccountingDate: true in /templates endpoint.
accountingDate info for template can accessed from the /accountingDates endpoint Required if useCatagoryName: true in /templates method.

categoryName info for template can accessed from the /accountingDates endpoint byte[] body  8 Request example { "templateId": "S14", "ssn": "1234567890", "accountingDate": "2020-02-29T00:00:00", "categoryName": "Móðurfélag", "file": "dGhpcyBpcyBhIHRlc3QgZmlsZQ==" } Response HTTP status codes  201.

Created  400.

Bad Request  401.

Unauthorized  403.


Forbidden  429.

Too many requests  500.

Internal Server Error HTTP: 201.

Created Name Description Type documentId message Id of the document created in the system Message from the system string string JSON example response { "documentId": "2b8bf630-fb55-4c8a-a56e-49880cab7744", "message": "Document added to queue" } 9 DeliveredReports(GET: dataportal/deliveredReports) List of delivered reports.
URL GET https://api.sedlabanki.is/dataportal/deliveredReports Request Parameters Name Description Data type Type Required token Authentication token string header ssn Social security number (kennitala) of the reporting party string parameter templateId Report template id string parameter   Request example #1 GET https://api.sedlabanki.is/dataportal/deliveredReports?ssn=1234567890 Request example #2 GET https://api.sedlabanki.is/dataportal/deliveredReports?ssn=1234567890&templateId=F14 Response HTTP status codes  200.
OK  400.

Bad Request  401.

Unauthorized  403.

Forbidden  429.

Too many requests  500.

Internal Server Error 10 HTTP: 200.
OK Name Description Data type deliveryId Delivery id templateName Template name description Report description accountingDate Accounting date int string string Date Date created status Report created date Status of the report string catagory Catagory of the report string reportUser Who created the report string templateId Id of the template string JSON example response [{ "deliveryId": 1234, "templateName": "Name of the Template", "description": "Description of the Template", "accountingDate": "2019-12-31T00:00:00", "created": "2021-03-19T00:00:00", "status": "Móttekin", "catagory": "Móðurfélag", "reportUser": "Prufa, "reportId": "F233" }] 11 AccountingDates(GET: dataportal/accountingDates) List of accounting dates.
URL GET https://api.sedlabanki.is/dataportal/accountingDates Request Parameters Name Description Data type Type Required token ssn Authentication token Social security number (kennitala) of the reporting party string header string parameter   templateId Report template id string parameter Request example #1 GET https://api.sedlabanki.is/dataportal/accountingDates?ssn=1234567890 Request example #2 GET https://api.sedlabanki.is/dataportal/accountingDates?ssn=1234567890&templateId=F14 Response HTTP status codes  200.
OK  400.

Bad Request  401.

Unauthorized  429.

Too many requests  500.

Internal Server Error 12 HTTP: 200.


OK Name Description Data type templateId Template id templateName Template name string string accountingDate Accounting date Date categoryName Catagory name string JSON example response [{ "templateId": "F13", "templateName": "Name of the Template", "accountDate": "2019-12-31T00:00:00", "catagoryName": "Móðurfélag", }] Support To get support or ask questions about the API, please contact adstod@sedlabanki.is 13